Skip to main content

run_file_rule

Function run_file_rule 

Source
pub fn run_file_rule<R: FileRule>(
    rule: &R,
    root: &Path,
    explicit_files: Option<&[PathBuf]>,
    walk_config: &WalkConfig,
) -> DiagnosticsReport
Expand description

Run a FileRule against a set of files with automatic caching and parallel execution.

  1. Walk files (or use explicit_files)
  2. Check cache for each file (sequential — fast DB lookups)
  3. Compute cache misses in parallel (rayon par_iter)
  4. Store new results in cache
  5. Merge cached + fresh findings and call to_diagnostics()