Skip to main content

build_conditional_lint

Function build_conditional_lint 

Source
pub(crate) fn build_conditional_lint(
    changed_paths: &[String],
    extensions: &[&str],
    lint: fn(&Path) -> LintFnResult,
) -> fn(&Path) -> LintFnResult
Expand description

Conditionally returns the supplied lint or LINT_NO_OP based on file changes.

An empty extensions slice means the lint is unconditional (always runs).