rust-lang/rust

rust-lang/rust ships its own ~5kLoC custom linter binary because no off-the-shelf tool can express its structural rules. alint covers the canonical 30 % of those rules in 18 lines of YAML — and the gap analysis points at exactly four new rule kinds that would push that to ~55 %.

Narrative
Replaces the structural subset of your custom orchestration layer
Rules
62
Last revalidated
Engineering reference
README on GitHub · .alint.yml

Why this matters

rust-lang/rust is the canonical “we own a compiler, of course we shipped our own linter binary” repo. src/tools/tidy/ is a ~5kLoC Rust binary that runs 32 named tidy checks plus an extra_checks dispatcher that fans out to ruff, eslint, clang-format, shellcheck, and typos. Every change to a check requires a rebuild of the binary. Every new contributor structural rule needs Rust + a pub mod foo; line + a check!() registration

This is the second-strongest case study in the catalogue (behind kubernetes) for the launch positioning, and uniquely valuable for the “polyglot monorepo / project-with-its-own-linter- binary” audience — the readers who already know generic linters don’t fit their needs and have built bespoke tooling.

Headline catch

~13 of the 32 tidy modules become declarative. The 30 % that fit alint’s grammar map cleanly to 18 lines of YAML — including the most-often-cited tidy::style checks (line length, file length, trailing whitespace, line endings, no-TODO), edition pin, extdeps allowlist, known-bug headers, rustdoc-gui description lines, Windows-illegal filenames, no-#[test] in stdlib, debug-artifact guards. Plus the extra_checks dispatcher folds into one command: rule per scope.

Even on the rest, alint replaces the outer “walk the tree, dispatch the linter, collect the diffs” plumbing while shelling out to ruff/eslint/clang-format via the command rule kind. Net: alint can take over the orchestration of ~13 of the 32 tidy modules + most of the verify-*.sh scripts with one declarative config, which is what src/tools/tidy/ was bespoke-built to do.

The pitch lands as: “we’re not asking you to throw away your custom linter, we’re asking you to push the 30 % of mechanical checks down into a declarative layer so you can focus your handwritten Rust on the AST-aware domain logic that actually needs a custom binary.”

Where alint earns its keep here

Future story angles

The factual engineering writeup (tooling inventory, mapping table, gap catalogue, validation status footer) lives in the public alint repo at github.com/asamarts/alint/tree/main/examples/rust-lang-rust/README.md.