Code Inspections in ASP.NET
In ASP.NET, JetBrains Rider 2021.2 provides two kinds of code inspections: 6 inspections that detect errors such as broken syntax, unresolved symbols, compiler errors, and so on (you cannot configure or disable any of these inspections), and 35 proprietary code inspections, any of which you can disable or change its severity level.
These code inspections help you detect code issues in design time in all open files, and additionally they allow you to find code issues in specific scope.
Configurable ASP.NET inspections are listed below, grouped by their categories.
Common Practices and Code Improvements (1 inspection)This category groups inspections that hunt for medium severity issues that mainly affect code readability.
Potential Code Quality Issues (25 inspections)This category includes inspections that detect critical issues (code smells), mostly with Error or Warning level. This category also includes inspections that ensure localization assistance.
|ASP.NET Dead Code ||Warning|
|ASP.NET Resolve Warning ||Warning|
|ASP.NET Warning ||Warning|
|Cannot resolve property ||Error|
|Cannot resolve resource ||Error|
|Cannot resolve resource item ||Error|
|Invalid control type ||Error|
|MVC (mismatch Model Type) ||Error|
|MVC (unknown action) ||Error|
|MVC (unknown area) ||Error|
|MVC (unknown controller) ||Error|
|MVC (unknown masterpage) ||Error|
|MVC (unknown partial view) ||Error|
|MVC (unknown template) ||Error|
|MVC (unknown view component view) ||Error|
|MVC (unknown view component) ||Error|
|MVC (unknown view) ||Error|
|Non-accessed field (non-private accessibility) ||Suggestion|
|Object data source method resolve problem ||Error|
|Unknown content placeholder ||Error|
|Unknown skin ||Error|
|Unknown symbol ||Error|
|Unknown theme ||Error|
|Unsupported pageParserFilterType ||Warning|
|Wrong image size ||Warning|
Redundancies in Code (3 inspections)Code inspections in this category look for redundancies and dead code, which affect code readability and style, and could be safely removed. Some code redundancies cannot be fixed automatically, and quick-fixes for them are performed in the interactive mode, requiring the user input. But the majority of the redundancies can be fixed without user interaction, using either fix in scope or code cleanup.
|Redundant using directive ||Warning|
|Unused import clause ||Warning|
|Unused register directive ||Warning|
Redundancies in Symbol Declarations (1 inspection)This category includes code inspections, mostly with the warning severity level, which detect empty and unused symbol declarations.
|Type member is never used (non-private accessibility) ||Suggestion|
Spelling issues (5 inspections)These inspections detect typos in various contexts.
|Typo in comment ||Suggestion|
|Typo in identifier ||Suggestion|
|Typo in markup attribute value ||Suggestion|
|Typo in markup text ||Suggestion|
|Typo in string literal ||Suggestion|