Skip to content

Command line

slopometer [PATH]

PATH defaults to the current directory. A single file analyzes that file alone.

Options

OptionEffect
--jsonWrite the full report as JSON, and nothing else, to standard output
--explainShow 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-unconfirmedList 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

CodeMeaning
0Analysis completed, whatever it found
non-zeroAnalysis could not run: unreadable path, or invalid configuration

Dual licensed under MIT or Apache-2.0.