Why this case study matters
uv is one of the cleaner cross-language monorepos in the Rust + Python
ecosystem: a 67-crate workspace driving a Maturin-built Python
distribution, with 8 GitHub Actions check-*.yml workflows and ~15
helper scripts under scripts/ covering the structural-validation
surface end-to-end.
Roughly 40% of that surface maps directly onto declarative alint rules. Another 30% leaves the alint scope by design (codegen drift, archive content, build-system checks). The remaining 30% is the interesting slice — manifest-shape conventions enforced informally by code review.
That last bucket is where the case for alint lands the hardest. uv’s
contributor docs say every crates/uv-* should opt into
[workspace.lints] and inherit edition / license from
[workspace.package]. 67 of 69 published crates do. The two exceptions
are documented. The only thing stopping a slow drift is reviewer
attention.
Headline catch
uv-crate-inherits-workspace-lints reduces a 67-crate manual review to
one declarative rule. Same shape applies to
uv-crate-edition-from-workspace and
uv-crate-license-from-workspace. All three correctly flag exactly the
documented-as-exceptional crates (uv-trampoline,
uv-performance-memory-allocator, uv-pep440, uv-pep508) — and would fire
the moment a 68th crate quietly drops the inheritance line.
When run against the live tree, the alint config surfaces 9 real findings against 63 rules passing cleanly:
- 6 are documented-exceptional crates the rule correctly identifies
- 3 are committed
.ruff_cache/directories that shouldn’t be there but are — a real hygiene bug nothing in uv’s CI catches today - 2 are
[[bin]]target-name kebab-case patterns Cargo allows but the convention check doesn’t expect
The interesting line is the third bullet: tracked .ruff_cache/
directories that no current uv check sees, surfaced declaratively from
the same config that enforces the workspace-lints inheritance.
Where alint earns its keep here
alint’s pitch in this repo is convention-without-checks: uv has
strong conventions, well-documented contributor expectations, and a
mature CI pipeline — and yet the workspace-inheritance contract that
ties 67 crates together has no automated gate. alint’s
for_each_dir + file_content_matches (or the v0.10
toml_path_equals family) reduces every per-crate inheritance
assertion to one rule.
The case study also confirms two v0.10 rule-kind candidates by
demand: cross_file_value_equals (uv adds the eighth source via
the trampoline cross-lockfile sync), and python/pep-621-shape@v1
as a bundled ruleset that would replace the validate-pyproject
shellout for any Python project on PyPI.
Future story angles
- uv as the canonical “Rust + Python monorepo” reference config once the cross-file value-equality and PEP 621 ruleset land in v0.10 — the trampoline lockfile sync is the cleanest illustration of the cross-file primitive.
- “alint catches what code review misses” — the slow-drift framing is the load-bearing one for repos with strong human review hygiene.