docs: fix broken CLI flag and inverted score semantics in README#22
Open
dmchaledev wants to merge 1 commit into
Open
docs: fix broken CLI flag and inverted score semantics in README#22dmchaledev wants to merge 1 commit into
dmchaledev wants to merge 1 commit into
Conversation
- Replace non-existent --output=sarif with the actual --format=sarif flag in README and dev.to launch post (the documented command errored out and exited with code 2) - Correct the programmatic example comment: the risk score is higher = riskier (per scorer.ts/types.ts), not lower, and clarify the passed gate
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 concrete documentation bugs in the primary
README.md(and the dev.to launch post) — the first things a new user reads — that actively mislead users:1. The documented SARIF command doesn't work
The Quick Start shows:
But the CLI only accepts
--format=, not--output=. An unknown flag falls through to the error branch incli.ts(Error: Unknown flag "--output=sarif") and exits with code 2 — so the copy-paste-able command in the README fails immediately. This is the exact command a CI user would reach for.2. The risk-score semantics are described backwards
The programmatic example commented:
This is inverted.
scorer.tsandtypes.tsboth define the score as higher = more risk (severity weights are summed and capped at 100), andscanner.tssetspassed = score < 50 && no critical findings. A user reading "lower = riskier" would interpret the CI gate backwards.Fix
--output=sarifwith the real--format=sarifflag inREADME.mdanddev-to/launch-post.md.(higher = riskier)and clarify thepassedgate condition.Docs-only change; no code or tests affected.
https://claude.ai/code/session_0165ZgwpmDnLYUiRzbgykfmq
Generated by Claude Code