Skip to main content

config_pattern_diagnostics

Function config_pattern_diagnostics 

Source
pub fn config_pattern_diagnostics(
    config: &ResolvedConfig,
    reports_dependencies: bool,
) -> Vec<WorkspaceDiagnostic>
Expand description

workspace_diagnostics[] entries for the config entries that had no effect in the latest dead-code pass over config.

In config order per setting:

  • each ignoreFindings pattern that matched no finding;
  • each ignoreDependencies glob that matched no declared dependency, and each ignoreDependencies entry that hid no dependency finding;
  • each entry pattern that matched only files that are entry points anyway;
  • each ignorePatterns glob that excluded no file the run would otherwise analyze.

The ignoreDependencies entries need reports_dependencies. A surface passes reports_dependencies = false when its run does not report dependency findings (an issue-type filter without the dependency types, or a file scope), because a dependency entry is then not relevant to what the run shows. A --production run checks fewer files and dependency sections, so it reports no redundant entry (issue #3824).

The CLI, the programmatic API and the MCP typed path all build their envelope from this one function, and the human note reads the same entries, so every output states the same patterns.