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
- a unit test. The orchestration plumbing — walk the tree, dispatch the linter, collect the diffs — is the same shape alint already expresses.
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
- The 30 % declarative subset is one declarative file vs. 13
modules + a
lib.rsregistration + amain.rscheck!()call + per-module unit tests. Adding a rule to alint is 5-10 lines of YAML; adding one to tidy is a new Rust module. tidy::alphabeticalis the canonical demand-driver for the v0.10ordered_blockrule kind. sortedness between marker pairs is the single most-requested missing rule kind across the case-study catalogue —[dependencies]ordering in every Cargo workspace,requirements.txt, imports blocks. The// tidy-alphabetical-start/-endmarkers are the canonical example.tidy::triagebotis a 6-source confirmation for v0.10registry_paths_resolve. Alongside clap + cpython + arrow + pytorch + tensorflow — past saturation. The rule generalises to CODEOWNERS validation in every GitHub repo, ESLintoverrides[].files, Cargo[[bin]].path, and dozens of similar config-driven path registries.- A
tidy@v1bundled-ruleset draft is a one-line adoption story. Packaging the canonical 30 % asalint://bundled/tidy/rust@v1(withscope_filterto excludesrc/llvm-project/andsrc/gcc/by default, and parameterised line-length thresholds for.goml/ error-code markdown) would raise the case study’s pitch from “18 lines of YAML” to “1 line of YAML” for every rust-lang/rust contributor. - The boundary is honest. The 14 out-of-scope tidy modules
(AST analysis, codegen drift, feature/error-code cross-reference,
target-policy heuristics) are explicitly recommended to stay on
./x test tidy. Same framing as the kubernetes case study — alint’s non-goals are deliberate.
Future story angles
- Launch tile candidate — second tile after kubernetes for the “project-with-its-own-linter-binary” audience. The contrast lands: kubernetes has 50 verify-scripts → alint replaces 17; rust-lang/rust has one custom linter → alint covers 30 % of it declaratively.
ordered_blockv0.10 ship narrative — rust-lang/rust is the canonical example. When the rule kind ships, the case study’s “13 of 32” jumps to “14 of 32” and the headline gets to add “andtidy-alphabetical-*is now declarative too.”- Bundled-ruleset adoption ladder rung —
alint://bundled/tidy/ rust@v1is a launch-story candidate; the “1 line of YAML for rust-lang/rust contributors” framing is sharper than the current “18 lines.” scope_filterevolution refactor — current config repeatssrc/llvm-project/**+src/gcc/**excludes across 5 rules; v0.9.17’s named-scope evolution centralises this into a single source of truth and is itself a “what does the v0.10 surface buy you?” demonstration.