Static Code Analysis
CodeRush includes a static analysis tool - the Code Issues window. This window detects possible issues in your code and can optionally display Visual Studio code issues. The list of supported issue types is available in the Analyzers Library article.
You can use the following approaches to analyze your code:
- By request, in the Code Issues window
- In the background, using the Visual Studio’s Error List window
Generated Code Analysis
You can specify files and regions that contain generated code on the Editor | All Languages | Generated Code page.
CodeRush skips the specified items in code analysis and code cleanup.
Note
The Generated Code page already includes commonly used file masks and regions for generated code (for example, the “*.Designer.cs” file).
If you want to use code analysis in generated code, enable the “Check designer files and generated code” option on the Editor | C# or Visual Basic | Code Analysis | General options page.
If you want to check generated code in the Spell Checker, enable the “Check designer files” option on the Editor | All Languages | Code Analysis | Spell Checker options page.