Command line
slopometer [PATH]PATH defaults to the current directory. A single file analyzes that file alone.
Options
| Option | Effect |
|---|---|
--json | Write the full report as JSON, and nothing else, to standard output |
--explain | Show the density, half density, and tier contributions behind each score |
--config <FILE> | Use this configuration instead of discovering one |
--min-severity <LEVEL> | List only findings at or above low, medium, or high |
--category <NAME> | List only findings in one category |
--show-unconfirmed | List findings the engine could not confirm |
--disable <RULE> | Turn a rule or category off for this run |
--enable <RULE> | Turn a rule or category on for this run |
--exclude <PATTERN> | Leave matching paths out of the analysis |
--color <WHEN> | auto, always, or never |
Filters change the listing, never the score
--min-severity and --category affect what is displayed. Scores are always those computed from every finding, so narrowing the view can never flatter the number.
Colour
Colour is on for a terminal, off for a pipe or a file, and off whenever NO_COLOR is set. --color overrides that in either direction.
Colour never carries anything the text does not also say. Severity is spelled out, scores are printed, grades name their range. A report read without colour loses nothing, and a test asserts it.
Exit codes
| Code | Meaning |
|---|---|
0 | Analysis completed, whatever it found |
| non-zero | Analysis could not run: unreadable path, or invalid configuration |