ReSharper Web Help

All ReSharper code inspections as well as structural search and replace patterns have one of the following four severity levels. According to the severity level, the code issue is highlighted in a particular way and the corresponding mark is added to the marker bar.

Highlightings help you quickly detect the severity of the code issue:

  • Errors. Errors have the highest priority of all - they prevent your code from compiling. When ReSharper detects an error, it highlights it in one of two alternative ways:
    • Displays an unresolved symbol in red:
    • Highlights a construct or part of it with a red curly underline:
    No matter how ReSharper chooses to display an error, you can roll the mouse pointer over the error to display its description as a tooltip (as shown in the picture above) (for details and other ways to know the reason why your code is highlighted, see Finding Out What is Wrong with Your Code).
  • Warnings. ReSharper provides you with warnings that don't prevent your code from compiling but may nevertheless represent serious coding inefficiencies. For example, ReSharper informs you about redundant type casts or namespace import directives, incorrect format strings, declared but never used local variables or private fields, unused private methods, etc. Constructs that have associated warnings are emphasized in one of the following ways:
    • With grayed text:
    • With a blue curly underline:
  • Suggestions. Code suggestions provide insights into code structure, drawing your attention to things that aren't necessarily bad or wrong, but probably useful to know. Suggestions are highlighted with a green curly underline:

    For instance, you might be interested to know that "parameter can be declared with base type", meaning that your method only uses members of the parameter's base type. This can be an indication of a different error, such as failure to take into account the specifics of the actual parameter type. Based on this knowledge, you may want to change the parameter's type - or not, if that is by design.
  • Hints. This is the lowest possible severity level. Unlike errors, warnings and suggestions, hints are not taken into account when you navigate to next/previous highlights, not shown in the Marker Bar and therefore do not influence the color of the Status Indicator. A hint simply brings your attention to a particular code detail and recommends a way of improvement. Code items that have associated hints are highlighted with a solid green underline. Move the mouse pointer over a highlighted item to view the corresponding hint in a tooltip:

 Note

If necessary, you can change severity level of every code inspection except compiler errors. For more information, see Configuring ReSharper Inspections.

See Also

Concepts

Procedures

Reference

External Links