Skip to content

Fixed Bug where last file in the lcov parse would not get added to the list. #2

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

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

Conversation

arjungandhi
Copy link

@arjungandhi arjungandhi commented Jan 19, 2024

Noticed this bug while working with the library. I've added a test case and fixed the issue

@arjungandhi
Copy link
Author

@sguiheux tagging ya so you can see this let me know if you need any more changes!

Comment on lines +142 to +143
// Add last file
report.Files = append(report.Files, fileReport)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it would be unusual, I suspect it is technically legal to have an lcov file with no files listed. If that is the case this should probably be:

                         if fileReport.Path != "" {
				report.Files = append(report.Files, fileReport)
			}

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.

2 participants