Description
src/ still uses the legacy foo/mod.rs module layout in 6 places
(vfs, record, parser, schema, btree, pager) — ff mod.rs | wc -l reports 7,
but the 7th (tests/spike/.../lemon-rs) is vendored spike code, out of scope.
Goal: ff mod.rs | wc -l == 0 for src/, permanently enforced.
Complexity
Estimate: small
Reasoning: Mechanical git mv foo/mod.rs foo.rs per module (6x), no
logic changes; plus one Cargo.toml lint line and one Makefile gate target.
Scope
- For each of vfs, record, parser, schema, btree, pager:
git mv src/<m>/mod.rs src/<m>.rs. No content changes, no behavior change.
- Add
self_named_module_files = "deny" to [lints.clippy] in
Cargo.toml (clippy restriction lint — forbids foo/mod.rs in favor of
foo.rs), matching the existing deny-list style (unwrap_used,
expect_used, etc.) already there.
- Add a
mod-files gate to the Makefile (alongside grammar-drift,
mvl-limit) that fails if any mod.rs exists under src/, and wire it
into whatever aggregate gate target composes those checks.
Acceptance Criteria
Additional Notes
Belt-and-suspenders: the clippy lint alone should already catch this in
make lint; the Makefile target is a cheap, dependency-free backstop for
anyone running gates without clippy (and self-documents the goal each time
gates run).
Description
src/still uses the legacyfoo/mod.rsmodule layout in 6 places(vfs, record, parser, schema, btree, pager) —
ff mod.rs | wc -lreports 7,but the 7th (tests/spike/.../lemon-rs) is vendored spike code, out of scope.
Goal:
ff mod.rs | wc -l== 0 for src/, permanently enforced.Complexity
Estimate: small
Reasoning: Mechanical
git mv foo/mod.rs foo.rsper module (6x), nologic changes; plus one Cargo.toml lint line and one Makefile gate target.
Scope
git mv src/<m>/mod.rs src/<m>.rs. No content changes, no behavior change.self_named_module_files = "deny"to[lints.clippy]inCargo.toml (clippy restriction lint — forbids
foo/mod.rsin favor offoo.rs), matching the existing deny-list style (unwrap_used,expect_used, etc.) already there.
mod-filesgate to the Makefile (alongsidegrammar-drift,mvl-limit) that fails if anymod.rsexists undersrc/, and wire itinto whatever aggregate gate target composes those checks.
Acceptance Criteria
find src -name mod.rsreturns nothingcargo clippy --all-targets -- -D warningscatches a reintroducedmod.rsviaself_named_module_filesmake mod-files(or equivalent) fails on a reintroducedmod.rsandpasses otherwise; wired into CI same as
lint/grammar-drifttests/spike/.../lemon-rsleft untouched (vendored, out of scope)Additional Notes
Belt-and-suspenders: the clippy lint alone should already catch this in
make lint; the Makefile target is a cheap, dependency-free backstop foranyone running gates without clippy (and self-documents the goal each time
gates run).