pub fn scan_cached(
paths: &[PathBuf],
rules: &[Rule],
config: &Config,
cache_dir: &Path,
) -> Result<ScanResult, ScanError>Expand description
Scan with file-level caching. Files whose content hash matches a cached entry (and whose rules have not changed) return cached findings without reparsing.
cache_dir is the directory where cache files are stored. When a custom
cache directory is specified (via --cache-dir, SLOPGUARD_CACHE_DIR,
or scan.cache_dir in config), pass it directly. Otherwise pass the
project root and use CacheStore::new which appends .slopguard-cache.