Marker Bar and Status Indicator enable you to quickly check the state of the current file, navigate to code issues and other results of Code Inspections as well as other items.
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 and the status indicator will be red
This setting is configurable at 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.
Marker Bar (AKA Error Stripe) is a colored sidebar that ReSharper adds to the right of Visual Studio editor window. It 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 issue in the file. You can get pop-up tips for each issue 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.
- 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 colored icon at the top of the Marker Bar, shows the overall status of the current file. It changes color if the file contains errors or warnings. When you hover over it, the indicator shows the total number of errors and warnings in the current file.
Essentially, Status Indicator works like traffic lights:
|Whenever you see a red mark, it means that your file contains errors that would prevent it from compiling, 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 analysis is turned off for the current file. See Code Analysis section to learn how to switch code analysis on and off.|