Skip to main content

scan_files

Function scan_files 

Source
pub fn scan_files(
    files: &[PathBuf],
    rules: &[Rule],
    config: &Config,
) -> Result<ScanResult, ScanError>
Expand description

Scan an explicit list of files instead of walking directories.

Used by --diff, where git already produced the exact file set. Paths that no longer exist or that slopguard cannot parse are silently skipped.

Cross-file rules are not evaluated here. --diff sees only the changed files, so the project index would be incomplete and its impl counts wrong. Symbol contributions are still collected and cached, so a later full scan is not penalised.