docs: fix invalid --output flag and inverted score description#15
Open
dmchaledev wants to merge 1 commit into
Open
docs: fix invalid --output flag and inverted score description#15dmchaledev wants to merge 1 commit into
dmchaledev wants to merge 1 commit into
Conversation
The README and dev-to launch post documented `--output=sarif`, but the CLI only accepts `--format=`. Copy-pasting the documented command hit the 'Unknown flag' branch and exited with code 2, so the Quick Start SARIF example never worked. Also corrected the programmatic example comment: the risk score is 'higher = riskier' (see scorer.ts and types.ts), not 'lower = riskier' as previously documented, which inverted the meaning for CI gating.
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.
Problem
Two documentation bugs that directly mislead users:
--output=sarifis not a valid flag. Both the README Quick Start and the dev-to launch post show:But the CLI only accepts
--format=(src/cli.ts:111). Any unknown---prefixed flag falls through to theUnknown flagbranch and exits with code 2 (src/cli.ts:142). So the headline SARIF example — the integration most relevant for CI/GitHub Code Scanning — fails for anyone who copy-pastes it. Everywhere else in the repo (CHANGELOG.md,SECURITY.md,.github/workflows/ci.yml) already uses--format=.The risk-score direction was documented backwards. The README programmatic example said:
The implementation is the opposite — higher score = more risk (
src/scorer.ts:12-18sums positive severity weights;src/types.ts:75documents "0 (safest) – 100 (most risk)"). This inversion could lead someone to build a broken CI gate onreport.score.Fix
README.md:--output=sarif→--format=sarif; correct the score comment to(higher = riskier).dev-to/launch-post.md:--output=sarif→--format=sarif.Docs-only change; no source or test behavior affected.
https://claude.ai/code/session_01EkW3H335dFYPGATfCCKZUR
Generated by Claude Code