code analyzer
A tool built into the compiler that points out likely bugs and style problems as warnings.
Roslyn analyzers run during compilation and report diagnostics (CAxxxx, IDExxxx); AnalysisLevel and .editorconfig control which run and at what severity.
Examples
CA1822 suggests marking a method
staticwhen it never uses the object's own data.
See also