Skip to content

chore: adopt linecheck for per-file line-count enforcement#184

Merged
tupe12334 merged 1 commit into
mainfrom
chore/adopt-linecheck
Jul 20, 2026
Merged

chore: adopt linecheck for per-file line-count enforcement#184
tupe12334 merged 1 commit into
mainfrom
chore/adopt-linecheck

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Closes #183

What

  • Add linecheck.yml at the repo root: **/*.rs warns at 200 lines, errors at 1100 lines.
  • Add a linecheck job to .github/workflows/ci.yml (installs via cargo install linecheck --locked, runs linecheck .).

Why 1100 and not the tool's default 400?

core/src/run.rs is currently 1000 lines. Gating at the tool default (400) would fail every PR immediately. Starting the error threshold at 1100 (buffer above the current max) keeps CI green today while still catching new runaway growth and surfacing every file over 200 lines as a non-blocking warning. Lower the gate in follow-up PRs as files get split — see moadim-io/daemon's history for the iterative pattern.

Verification

Ran locally against this repo:

$ linecheck .
./Architecture.md: 228 lines (warn threshold: 200)
./core/tests/gate_integration.rs: 247 lines (warn threshold: 200) — Getting long — consider splitting into submodules
./core/tests/cli.rs: 224 lines (warn threshold: 200) — Getting long — consider splitting into submodules
./core/src/flow.rs: 438 lines (warn threshold: 200) — Getting long — consider splitting into submodules
./core/src/bin/main.rs: 532 lines (warn threshold: 200) — Getting long — consider splitting into submodules
./core/src/cel_eval.rs: 465 lines (warn threshold: 200) — Getting long — consider splitting into submodules
./core/src/run.rs: 1000 lines (warn threshold: 200) — Getting long — consider splitting into submodules
$ echo $?
0

All warnings, no errors — the new CI job will pass.

Adds linecheck.yml (rust files warn at 200 lines, error at 1100 — a
buffer above the current largest file so CI stays green) and a
linecheck CI job that installs via cargo and runs `linecheck .`.

Closes #183
@tupe12334
tupe12334 merged commit c02f129 into main Jul 20, 2026
11 of 13 checks passed
@tupe12334
tupe12334 deleted the chore/adopt-linecheck branch July 20, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt linecheck for per-file line-count enforcement

1 participant