fix(reporter): test and correct summary counts#15
Merged
Conversation
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.
What changed
Added focused JSON and text reporter tests, corrected singular/plural summary labels, and included informational findings in text summary counts.
Why
Reporter output is part of the CLI contract. The previous summary rendered labels such as
1 errorsand omitted informational findings whenever errors or warnings were also present. The updated tests prevent those regressions while preserving the existing grouped layout.Testing
npm.cmd run build- passednpm.cmd test- 60 tests passed, 0 failednpm.cmd run lint- passednpm.cmd run prepublishOnly- passednode bin/opk scan src/cli --json- 0 findings, 7 rules runnpm.cmd run scan- expected exit code 1 with 18 errors and 33 warnings from existing fixtures and rule definitionsgit diff --cached --check- passedRisks
Text consumers that asserted the grammatically incorrect summary labels will need to accept the corrected output. The grouped finding layout is unchanged.
Follow-up
Remove default npm registry access from OPK-006 and replace it with an explicitly approved local-first design.