You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should fully skipped files be marked as 100% covered or 0% covered? #565
We are treating files that are fully irrelevant (just comments for instance) different from files that are skipped through # :nocov: as a whole. A file with just irrelevant lines gets 100% coverage, one where all lines are skipped (or some are irrelevant) gets 0% coverage:
Question is: Does that sound right? I feel like skipped lines should mostly be like non relevant lines (as the user decided they are not relevant) and it feels weird that a file is 0% covered, but the whole project still has 100% coverage. Removing that distinction would also simplify the code :)
Stumbled on this while investigating #563 (fix in #564 )I stumbled across - e.g. the difference (as apparent in the fix) that mostly caused it was the difference that no_lines? is different from relevant_lines.zero?as no_lines? only triggers if all lines are irrelevant (such as comments only).
Activity
PragTob commentedon Mar 18, 2017
@colszowka would love to get your input here, as I might be missing something :)
krtschmr commentedon Sep 4, 2019
came here since i we have same issue.
some rake tasks, like annotate_models or generate_erd_diagram are sitting at 0% because it's
nocovdoesn't make any sense at all.
i checked but can't find a filter or exclude method to just exclude them from the coverage at all.
like
excluded_files.include(current_file)seems. to not exist.
PragTob commentedon Dec 3, 2019
If no one stops me I'll change it to be 100% :)
PragTob commentedon Jan 25, 2020
No one stopped me 🤷♂️
Use CoverageData everywhere for consistency
Use CoverageData everywhere for consistency
devel/ruby-simplecov: update to 0.18.1
Use CoverageData everywhere for consistency
devel/ruby-simplecov: update to 0.18.1
devel/ruby-simplecov: update to 0.18.1
devel/ruby-simplecov: update to 0.18.1