Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

feat(lcov): remove uncovered but skipped lines #752

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

Conversation

djedje72
Copy link

Reporter lcovonly for .lcov files should force coverage for uncovered but skipped lines in collector map.
This will allow SonarQube or other analysis tools that use lcov files to show good coverage measurements.

@djedje72 djedje72 changed the title fix(lcov): remove uncovered but skipped lines feat(lcov): remove uncovered but skipped lines Jan 19, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 97.525% when pulling 6d0e071 on djedje72:lcovonly-fix-skipped into 89e338f on gotwarlost:master.

@clakech
Copy link

clakech commented Jun 26, 2017

🆙

meta = functionMap[key],
covered = stats > 0,
skipped = meta.skip;
writer.println('FNDA:' + [ (covered || !skipped) ? stats : 1, meta.name ].join(','));
Copy link

Choose a reason for hiding this comment

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

quite hare to read, maybe create a var on previous line for (covered || !skipped) ? stats : 1

writer.println('BRDA:' + [line, key, i, b].join(','));
covered = b > 0;
skipped = meta.locations && meta.locations[i] && meta.locations[i].skip;
writer.println('BRDA:' + [line, key, i, (covered || !skipped) ? b : 1].join(','));
Copy link

Choose a reason for hiding this comment

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

quite hare to read, maybe create a var on previous line for (covered || !skipped) ? b : 1

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

Successfully merging this pull request may close these issues.

3 participants