Expand description
The content checks, asked about a FILE rather than about the index.
Every check reachable from here is pure: give it a path and some bytes and
it answers, with no git, no index, no stash, and no opinion about what is
staged. That is the whole difference from crate::dispatch, which
rehearses a commit and is entitled to all of those things.
The separation is deliberate and load-bearing. amont run answers “is this
commit ready”, which is a question about the index; an editor asks “what is
wrong with this buffer”, which is a question about content that may not be
staged and may never have been saved. Conflating them would drag index
fidelity — the stash, the restore path, the staged-only hold — into what
ought to be a read-only lookup.
Not every check can come here, and that is fine. branch-pattern,
pull-rebase and package-lock are not about the contents of a file at
all, and clippy/ruff/eslint already have editor integrations of their
own. What is left is the set amont uniquely owns — which is also the set
docs/ci.md says CI deliberately does not reproduce.
Functions§
- scan
- Every finding for one file, ordered for reading.