Skip to main content

apply_scope

Function apply_scope 

Source
pub fn apply_scope(
    results: &mut AnalysisResults,
    scope: &DeadCodeScope<'_>,
    config: &ResolvedConfig,
)
Expand description

Narrow dead-code results to the scope of the run.

The CLI, the programmatic API and the MCP typed path call this one function, so a scope narrows the same way on every surface. The filters run in this order: workspace roots, changed files, the diff, the file list. Then the configured ignoreFindings patterns run again, because the scope filters remove owners from a finding with several owners (duplicate_exports). A finding that only ignored owners hold after the scope is hidden, as the “hidden only when every owner matches” rule says.