All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Code Issues Window

  • 3 minutes to read

The Code Issues window allows you to analyze a solution, active project or active document.

CodeIssues_main

To analyze a current solution, perform the following actions:

  • Invoke the Code Issues window.

    Open the CodeRush menu and choose the Code Analysis | Code Issues menu item.

    CodeIssues_main

  • Use the Mode Selector drop-down menu to choose the static code analysis mode.

    CodeIssues_main

    The Code Issues window supports two operation modes:

    1) Run CodeRush Diagnostics - uses the Analyzers Library to analyze code.

    2) Load from Visual Studio - performs the Visual Studio built-in code analysis.

  • Click the Refresh button to analyze your code.

or

  • Open the CodeRush menu and choose the Code Analysis | Analyze Solution menu item.

    CodeIssues_main

If you do not need to find all code issues in the solution, you can run static code analysis for the active project or file only. This gives the following benefits:

  • Code issues from other projects are excluded from analysis.

  • The code analysis time is decreased.

To run static code analysis for the active project or file:

  • Open the CodeRush menu and choose the Code Analysis | Analyze Active Project or Analyze Active Document menu item.

    CodeIssues_main

or

  • Choose the Scope analysis of an active project or Scope analysis of an active document mode in the Code Issues window and click Refresh.

    Scope

When you select an issue in the code issues list, CodeRush makes the following actions:

  • Highlights the code elements which can cause the issue in the Code Issues window's preview.
  • Moves the caret to the corresponding declaration in the code editor.

Sync

Filter Code Issues

Filter Code Issues by Analyzer Id

Perform one of the following actions to filter issues found in the code:

  • Enter the analyzer Id in the Code Issues window's search box (for example, CRR0048).

    CodeIssuesSearch

or

  1. Click the Show filter editor toolbar button to open the Filter Editor.

    FilterEditor

  2. Click the drop-down button and choose the Add Condition item.

    AddCondition

  3. Enter the analyzer Id value in the "enter a value" field and click OK.

    EnterId

CodeRush filters code issues based on the specified criteria.

Filtered

Filter by Code Issue Type

Use Show Errors, Show Warnings, and Show Messages toolbar buttons to filter code issues by the required code issue type.

The image below shows the code issues filtered by errors.

Filtered

Choose Code Issues Window Layout

You can set the Code Issues window to one of the following layout modes:

  • Landscape layout - CodeRush shows the code preview on the right.

  • Portrait layout - CodeRush shows the code preview below.

  • Code Issues only - CodeRush does not show the code preview.

The following image shows the Code Issues window set to portrait layout.

Filtered

Code Issues Grouping

CodeRush allows you to group code issues by projects, folders, files, namespaces, types, and/or members.

The image below shows code issues grouped by folders and files.

CodeIssuesCatalog

Export Code Issues Report

CodeRush can export a code issue report to plain text or an XML file.

  • Click the Export drop-down button and choose Export to XML... or Export to Text... item.

    Export

  • In the Save As dialog, specify a file name and click Save.

    Save

See Also