Skip to main content

run_all

Function run_all 

Source
pub fn run_all(ctx: &Ctx<'_>, all_files: bool) -> Verdict
Expand description

amont run — every applicable check, on demand.

Two questions, and the mode says which it answers:

  • staged (default) is “would my commit pass” — the same set a commit would check, so it is a rehearsal of the hook, and it takes the same index-fidelity hold the hook takes.
  • --all-files is “does my working tree pass”. Deliberately NOT the same question: on a dirty tree it reports on content that is not committed and may never be. That is right for adopting a check into an existing repository, where git add . is not an acceptable way to measure the mess, and it is why --all-files takes no stash — there is no staged/unstaged distinction to protect when the answer is “all of it”.