Roslyn analyzer
A plug-in to the C# compiler that inspects code while you edit and build, and reports diagnostics about likely bugs, unsafe patterns or style.
In more detail
.NET ships many analyzers, with rule identifiers such as CA2000. Their severity is configured in EditorConfig, and useful rules explain a risk rather than enforce taste.
Related terms
- Roslyn — The open-source compiler for C# and Visual Basic, which turns source code into intermediate language inside an assembly.
- diagnostic — A message the compiler or an analyzer reports about code, carrying a rule identifier such as CA2000, a severity and an explanation.
- EditorConfig — A plain-text .editorconfig file that records a repository's coding style, and in .NET also the severity of each analyzer rule, for editors and the build to apply.
- AnalysisLevel — The build property that selects which set of .NET code-analysis rules is on by default and at what severity.
Taught in
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Code Quality: .editorconfig and Roslyn Analyzers — Modern .NET Core, C# & Enterprise Microservices