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
ruff subcommand misrouting: rule, config, linter, etc. get check --output-format=json injected #2669
Only format and version are excluded. All other ruff subcommands — rule, config, linter, clean, server, analyze, generate-shell-completion — are treated as check invocations and get check --output-format=json prepended.
The is_check detection uses a blocklist (only "format" and "version" excluded) instead of an allowlist. Any first argument that doesn't start with - and isn't "format" or "version" is assumed to be a check target path.
Suggested Fix
Add a RUFF_SUBCOMMANDS constant (similar to NPM_SUBCOMMANDS in npm_cmd.rs) listing known ruff subcommands, and exclude them from is_check detection:
ruff subcommands (rule, config, linter, clean, server, analyze) are misclassified as check targets and get check --output-format=json prepended, causing them to error; fix by switching from blocklist to allowlist in ruff_cmd.rs
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/commands/ruff_cmd.rs
Triaged automatically by wshm · This is an automated analysis, not a human review.
I am working on this against current develop. I will replace Ruff's two-item blocklist with an explicit official-subcommand allowlist, keep path-style invocations routed through , and add routing tests for every affected subcommand.
Correction: I will replace Ruff's two-item blocklist with an explicit official-subcommand allowlist, keep path-style invocations routed through ruff check, and add routing tests for every affected subcommand.
Activity
pszymkowiak commentedon Jun 27, 2026
🔍 Automated Triage
bughighSummary
ruff subcommands (rule, config, linter, clean, server, analyze) are misclassified as check targets and get
check --output-format=jsonprepended, causing them to error; fix by switching from blocklist to allowlist in ruff_cmd.rs📁 Relevant files
src/commands/ruff_cmd.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
lntutor commentedon Jul 20, 2026
I am working on this against current develop. I will replace Ruff's two-item blocklist with an explicit official-subcommand allowlist, keep path-style invocations routed through , and add routing tests for every affected subcommand.
lntutor commentedon Jul 20, 2026
Correction: I will replace Ruff's two-item blocklist with an explicit official-subcommand allowlist, keep path-style invocations routed through
ruff check, and add routing tests for every affected subcommand.fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): prevent check injection for non-check subcommands
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …
fix(ruff): add RUFF_SUBCOMMANDS allowlist to prevent incorrect check …