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
ignoreFindingspattern that matched no finding; - each
ignoreDependenciesglob that matched no declared dependency, and eachignoreDependenciesentry that hid no dependency finding; - each
entrypattern that matched only files that are entry points anyway; - each
ignorePatternsglob that excluded no file the run would otherwise analyze; - each
overridesrule that cannot change a result of this config. - each
circularDependencies.allowentry that matched no cycle.
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) and no unmatched
circularDependencies.allow entry: a cycle through a test file is not
in that run.
A normal run does not report an ignoreDependencies entry that a
--production run could need, because following the note would add a
finding to that run.
An overrides rule reports also in a --production run, because its cause
does not depend on the files of the run. The reports_dependencies gate
removes the dependency rules (issue #4065). Read config after CLI flags
changed its rules, because a flag can start a detector.
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.