Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collect coverage for all class elements for filename #252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qododavid
Copy link
Collaborator

updates the cobertura coverage report processing logic to process all class elements for each file. This wont make a difference for most languages but Go in particular will have coverage reports with this pattern.

For example, the fragment below shows multiple class tags for the same file.

<classes>
	<class name="-" filename="taskmgr/internal/tasks/store.go" line-rate="1" branch-rate="0" complexity="0">
		<methods>
			<method name="NewFileStore" signature="" line-rate="1" branch-rate="0" complexity="0">
				<lines>
					<line number="23" hits="1"></line>
					<line number="24" hits="1"></line>
					<line number="25" hits="1"></line>
					<line number="26" hits="1"></line>
					<line number="27" hits="1"></line>
				</lines>
			</method>
		</methods>
		<lines>
			<line number="23" hits="1"></line>
			<line number="24" hits="1"></line>
			<line number="25" hits="1"></line>
			<line number="26" hits="1"></line>
			<line number="27" hits="1"></line>
		</lines>
	</class>
	<class name="FileStore" filename="taskmgr/internal/tasks/store.go" line-rate="0.82857144" branch-rate="0" complexity="0">
		<methods>
			<method name="Add" signature="" line-rate="1" branch-rate="0" complexity="0">
				<lines>
					<line number="29" hits="1"></line>
					<line number="30" hits="1"></line>
					<line number="31" hits="1"></line>
					<line number="32" hits="1"></line>
					<line number="33" hits="1"></line>
					<line number="34" hits="1"></line>
					<line number="35" hits="1"></line>
					<line number="36" hits="1"></line>
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant