ast-grep adds a min-severity CLI option
Introduced 2026-08-31 · score 0.92
HOW TO USE IT
When running repository checks with `ast-grep scan`, use `--min-severity <LEVEL>` to run only rules whose final severity is at least the threshold.
ast-grep scan --min-severity warningast-grep scan --error=<rule-id> --min-severity errorWHY THIS HELPS
Set a minimum severity when running ast-grep checks in a repository.
REQUIREMENTS AND LIMITATIONS
- Version: 0.45.3
- --min-severity <LEVEL>: Minimum final rule severity to run; accepted values: `hint`, `info`, `warning`, `error`, `off` (case-insensitive). Default `off` disables filtering.
- --error[=<RULE_ID>...]: Set the named rule's severity to error; repeat for multiple rules. `=` is required when specifying a rule ID. Severity overrides apply before the threshold.
FIRST-PARTY EVIDENCE
- https://github.com/ast-grep/ast-grep/releases/tag/0.45.3
- https://ast-grep.github.io/guide/project/severity
- https://ast-grep.github.io/reference/cli/scan
Check the installed version and the source before using it. Entry JSON