Skip to main content

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.

CodeIssues_main

You can use the following approaches to analyze your code:

Generated Code Analysis

You can specify files and regions that contain generated code on the Editor | All Languages | Generated Code page.

Options

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.

Options

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.

Options

See Also