Skip to main content

clippy_args

Function clippy_args 

Source
pub fn clippy_args(
    staged: &[String],
    not_the_index: bool,
) -> &'static [&'static str]
Expand description

What pre-commit clippy judges (ADR-0009, hooks.clippy-scope). It runs in the package root nearest each staged .rs, and without --workspace cargo judges that package alone (the default members, at a virtual root). The whole workspace is judged when a manifest, the lockfile, a lint config or the toolchain pin is staged — they change how every package compiles — or when the file set is not the index (--all-files). Lints a change provokes in a DEPENDENT package are caught by CI’s workspace clippy, not here: a cold --workspace per worktree was the longest and most lock-hungry check of a commit.