Home > Code Analysis > Code Issues visual presentation

Code Issues visual presentation

March 5th, 2011

CodeRush code issues technology highlights found issues right inside the Visual Studio code editor with different colors. There are two permanent bars with issue indicators to the left of the code editor, and to the right of the vertical scroll bar. The third optional bar is intended to view solution wide analysis statistics for files and projects. This bar appears at the bottom of the code editor, if enabled.

Let’s take a closer look at code editor highlighting and these three code issues bars.

As already noted, different types of code issues are highlighted with different color (which you can tweak). There are two ways of issue highlighting:

  • a wavy underline
  • a gray font for a source code.

A gray font is used for the Dead Code issue type. Other issue types use different colored underlines, such as red, blue, yellow, and green:

CodeRush Code issues code highlighting

Hovering over these visual marks inside the code editor will show you theĀ Code Fix hint:

CodeRush Code Fix hint

This hint is an important part of visual presentation of code issues. It contains information about code issues and different ways of their fixing. This hint allows you:

  • to see the list of issues found for a particular block of code
  • to see a brief description for an issue in the list when hovering over it:

CodeRush Code Fix hint with description

  • to correct an issue by clicking the available fix provider link:

CodeRush Code Fix hint with a fix link

CodeRush Code Fix hint and Suppression menu

  • to navigate between neighboring code issues using two green navigation buttons:

CodeRush Code Fix hint and nav buttons

If the Code Fix hint overlaps the source code, you can move it to another place by dragging using the mouse. The hint can also be controlled using the keyboard. The following shortcuts are available:



Arrow keys Selects the next or previous fix link.
Tab Navigates between the fix links and suppression triangles.
Enter Applies the selected fix to correct an issue.
Esc Hides the hint.

Now, the three code issues bars.

CodeRush Code issues bars

The bar on the left marks the code issues inside of the active text view. So, the issues you see on the code editor screen are “mirrored” to the left bar on the corresponding lines where issue is highlighted. Hovering over a mark will show you the Code Fix hint.

The bar on the right consists of the two parts:

  • document summary status on the top represented by a small icon indicating the issues state of the current source file (text document)
  • marks of issues for the entire source file (text document)

The document summary indicator shows whether the current source file contains issues. The following states are available:



CodeRush Code issues - File is being checked status The current document is being checked.
CodeRush Code issues - File has no issues status The current document does not contain any issues.
CodeRush Code issues - File has hints status The current document contains hints.
CodeRush Code issues - File has warnings status The current document contains warnings.
CodeRush Code issues - File has errors status The current document contains errors.

If you hover over an icon – the hint with the status description appears:

CodeRush Code issues Summary hint

The other part of the bar on the right shows code issues found inside of the entire source file. Hovering over this bar will show you the Code Fix hint or a list of Code Fix hints:

CodeRush Code issues Zoom Window hint

These hints shown from this bar has two more options:

  • temporarily make visible the block of code with an issue. Once you hover over an issue, the code editor will be scrolled to the code with an issue. And if the hint is closed or mouse cursor is moved out of the hint, the code editor will scroll back to the initial starting position (before the hint appeared).
  • navigate to the issue in question by clicking on it. If you click on the hint, the code editor will be permanently scrolled to the code block with an issue, so you can continue to work with it.

The last Project/File bar at the bottom of the code editor contains of two parts (lines):

  • Solution files (at the top)
  • Solution projects (at the bottom)

The project line lists all projects of the current solution. Project indicators are highlighted in one of the two blue colors. Hovering over the project line will show you the name of the project.

The files line lists all files of the solution. The indicators representing files are highlighted with a color according to its state. If the file contains errors, the indicator on the bar is highlighted in red, and so on. Hovering over the files line will show you the File Info hint with brief information about the file: the size of the file, the number of lines, the number of types and the count of warnings, errors and hints found in it:

CodeRush File Info hint

If the solution contains hundreds or thousands of files, the optional Magnifier window is available for the files bar. You can tweak the number of file indicators shown in this window and the minimal width of the file indicator when the magnifier window must appear. This is what it looks like when both the File Info hint and Magnifier window are shown:

CodeRush File Info hint and Magnifier window

This post is a part of post series about CodeRush Code Issues technology. To learn more about code issues, please refer to the appropriate topics:

  1. Code Issues technology overview
  2. Code Issues types overview
  3. Code Issues visual presentation (current post)
  4. Code Issues fixes and suppression
  5. Code Issues navigation techniques
  6. Code Issues tool window
  7. Code Issues configuration and options
  8. Code Issues overall list
  9. Creating your own code issue
Products: CodeRush Pro
Versions: 10.2 and up
VS IDEs: any
Updated: Jul/25/2011
ID: C078

Similar Posts:

  1. Ryan Jackson
    June 15th, 2011 at 09:38 | #1

    Is there an article on the Code Issues tool window? That’s really what I was looking for.

  2. June 17th, 2011 at 00:58 | #2

    @Ryan Jackson
    Thanks for your reminder. I’ll try to write an article next Monday.

  3. June 20th, 2011 at 10:46 | #3

    @Ryan Jackson
    Here you are – Code Issues tool window. Any feedback is appreciated!