diagnostic
A message the compiler or an analyzer reports about code, carrying a rule identifier such as CA2000, a severity and an explanation.
In more detail
The identifier leads to the rule's documentation. Fix the code the diagnostic points at rather than suppressing it.
Related terms
- compiler warning — A message from the compiler or an analyzer about code that builds but is probably wrong, identified by a code such as CS8602.
- 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.
- diagnostic severity — The level at which a rule reports, from none and suggestion through warning to error.
- suppression — Marking one diagnostic or scanner finding as intentionally ignored for some code, usually with an inline comment or attribute and a reason.
Taught in
- Code Quality: .editorconfig and Roslyn Analyzers — Modern .NET Core, C# & Enterprise Microservices
- Source-Generated Mapping with Mapperly — Modern .NET Core, C# & Enterprise Microservices