Skip to main content

evaluate

Function evaluate 

Source
pub fn evaluate(
    compiled: &CompiledRules,
    deps: &[FileDep],
    symbol_metrics: &[SymbolMetrics],
    file_complexity: &[FileComplexity],
    changed: Option<&HashSet<String>>,
) -> Vec<Violation>
Expand description

Evaluate all rules and return the violations.

changed is the --against REF change set. When present it acts as a filter (documented v1 approximation):

  • no_new_dependents: only inbound deps whose source file changed count (that is what “new dependent” means); without --against all inbound deps are reported so users can see the current state.
  • all other rules: a violation is kept when at least one endpoint’s file is in the change set.