fix(coverage): distinguish 'nothing tracked' from 'nothing covered' - #1172
Merged
Conversation
A mistyped --coverage-paths yields Total: 0/0 and the gate reported 'Coverage 0% is below minimum 80%'. That 0% is arithmetic, not a measurement: nothing was found to measure. The message sends the reader to their tests when the cause is the paths, and in CI it fails for a reason the output cannot act on. Report the two cases apart, and keep failing either way -- a misconfigured run quietly satisfying an 80% gate is worse than either message. The gate could not see the executable total because get_percentage echoes, so every caller wraps it in $( ) and a return slot set inside dies with that subshell -- the same boundary as #1145 and #1147. Totals now come from a slot-setting helper the gate calls directly; get_percentage stays the echoing wrapper its callers expect. Closes #1171
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Background
Related #1171
A mistyped
--coverage-paths(or one matching only comments) yieldsTotal: 0/0and the gate reports:That 0% is arithmetic, not a measurement — nothing was found to measure. The
message sends the reader to their tests when the cause is the paths, and in CI
it fails for a reason the output gives no way to act on.
💡 Changes
no executable lines were trackednames--coverage-pathsdirectlyget_percentageechoes, so every caller wraps it in$( )and a return slot set inside died with that subshell — the same boundary as A @data_provider that yields no data makes the test vanish #1145 and Duplicate test functions go undetected under --parallel #1147