Skip to content

What it measures

Code review has no cheap, repeatable way to answer "is this codebase sloppy, and where?". Linters check rule violations, coverage tools check tests, complexity tools emit one number with no evidence. None of them grade the things reviewers actually argue about.

slopometer grades five of them.

Abstractions that do not earn their keep

A trait with one implementor and no external consumer. A wrapper type that only forwards. A generic parameter instantiated at exactly one type. An interface implemented once and never exported. A type alias that only renames. A module that exists to forward what another module declared. Each is indirection nobody is taking advantage of, and each is reported with the reason it looks unearned.

Type checking given away

A position written any. An assertion that a value is present rather than an establishment of it. A cast laundered through unknown to reach a type the compiler would have refused in one step. A suppression comment with no reason written after it. Each discards a guarantee the rest of the file is relying on.

These overlap with what Biome and typescript-eslint report, and slopometer stays quiet where the project already enforces the equivalent. See the rules reference for how that is decided.

Reach nothing uses

A function every file in the program can call that only one file does. Mutable state shared with everything and owned by nothing. A header stating an interface nobody includes. Each hands out more access than anything asks for.

Documentation that has stopped describing the code

Public API with nothing written about it. Documentation that restates the signature and says nothing else. A documented parameter the function no longer takes. A comment paraphrasing the line beneath it.

Volume without meaning

Comments narrating every statement. Documentation templated across a dozen items with only the name substituted. Checks that cannot fail. Bodies that only defer the work.

What it deliberately does not measure

Rules whose correctness needs type inference or borrow analysis are absent, not disabled. Deciding a clone is unnecessary requires the borrow checker, and without one the rule would have to stay silent in every interesting case. A rule that cannot fire is not a rule; it is an entry in a feature list.

That is also why nothing here duplicates clippy. Where clippy is authoritative, slopometer says nothing.

The honest caveat

Sloppiness is a judgment, not a measurement. A single number is only defensible if every point of it traces back to a named rule you can inspect, disable, and reweight. That is the whole design: findings are the product, and scores are a rollup of findings that never exist independently of them.

Four rules ship switched off because measurement showed them firing too often on well-regarded code. Those decisions are recorded rather than buried, and calibration explains each one.

Dual licensed under MIT or Apache-2.0.