Marker Bar and Status Indicator enable you to quickly check the results of the design-time code inspection in the current file and navigate between code issues Also, the marker bar displays special marks for other ReSharper items, e.g. when you highlight usages in the file.
Marker bar and status indicator are not shown when:
- The Marker bar property is set to Do not show in the ReSharper | Options | Environment | Editor | Editor Appearance page.
- Design-time code inspection is disabled.
- The file is excluded from code inspection.
- The editor displays decompiled code.
Marker Bar (also known as the 'Error Stripe') is a sidebar that ReSharper adds to the right of Visual Studio editor scroll bar. Starting from Visual Studio 2013, marker bar can be also integrated in to the scroll bar. The Status Bar can represent the following items as individual markers:
- Code issues found by ReSharper's code analysis
- Structural search and replace results
- To-do items
- Usages of symbol in the file
Markers have different colors depending on the type of the corresponding item. Colors may vary between various color schemes but you can configure marker bar colors for each severity level individually.
The position of a marker on the bar indicates the relative position of the corresponding item in the file. You can get pop-up tips for each item by placing the mouse pointer over markers, and you can navigate directly to relevant lines of code by clicking on them.
It is normal to see many markers in the Marker Bar while your are working on a file. Many of these errors, warnings, and suggestions are eventually resolved as you complete the code. Should any errors remain when you feel your code is complete it may be time-saving to explore and resolve the errors found before you try to compile your project.
- Open the ReSharper | Options | Environment | Editor | Editor Appearance page.
- Use the radio buttons under Marker bar to choose whether to display the marker bar and if it should be integrated into the scroll bar (starting from Visual Studio 2013).
- If the marker bar is integrated into the scroll bar, you can also set the width of the markers.
- Choose Tools | Options in the menu and then go to Environment | Fonts and Colors page.
- In the Display items list, find items that start with ReSharper and end with ... Marker on Error Stripe, e.g.: ReSharper Code Analysis Error Marker on Error Stripe.
- Use the Item foreground selector to pick a color for the selected marker.
Status Indicator, a small icon at the top of the Marker Bar, shows either the status of the code inspection in the file or indicates the usage highlighting mode. When you hover the mouse cursor over it, the indicator shows the total number of errors and warnings in the current file, or (if you are in the usage highlighting mode) the number of usages in the file.
You can click on the status indicator to jump between code issues or usages in the file.
Status Indicator can have different icons with the following meanings:
|Whenever you see a red mark, it means that the file contains errors that would either prevent it from compiling or lead to exceptions in runtime, unless Treat warnings as errors is enabled in project properties (see the note above).|
|A yellow mark means that there are some warnings, but no errors that would prevent the file from compiling.|
|A green mark means that your code doesn't contain errors or warnings and it will compile.|
|The code inspection is disabled in the current file. See Configuring Code Inspection Settings section to learn how to toggle code inspection.|
|When you highlight usages in file, marker shows blue marks corresponding to the usages and the status indicator displays the corresponding icon until you press Esc. In this mode, you can click on the status indicator to jump between found usages.|
In Visual Studio project settings, you can choose to treat warnings as errors. ReSharper is aware of this option and highlights warnings accordingly: if this setting is on, then issues that correspond to compiler warnings will be highlighted as errors.
This setting is configurable in the project properties: Project | [Project Name] Properties | Treat warnings as errors and can be applied to all warnings if All is selected or to the specified warnings only.
- Code Analysis
- Code Inspection
- Inspection Severity Levels and Highlighting
- Marker Bar and Status Indicator
- Solution-Wide Analysis
- Quick-Fixes for Code Issues
- Solution-Wide Code Inspections
- Structural Search and Replace