run_and_report

Function run_and_report 

Source
pub(crate) fn run_and_report(
    lint_name: &str,
    path: &Path,
    run: fn(&Path) -> LintFnResult,
) -> LintFnResult
Expand description

Run a single lint, measure its duration, and report immediately.

§Rationale

Collapses the previous two‑step pattern (timing + later reporting) into one function so thread closures stay minimal and result propagation is explicit. This also prevents losing the error flag (a regression after refactor).