CodeRush Code Issues technology overview
CodeRush Code Issues technology (also known as Code Analysis) is essentially background static analyzer of the source code. The code is analyzed during code writing and/or reading without compiling or executing the program.
One of the most prominent uses of a static analyzer is for code defect detection. While you’re working in the source code, it will point out the code errors even before it’s compiled, and other specifics that can help improve the overall quality of the source code. This can help you improve your coding practices, and learn new language technics. Static-analysis techniques can also detect buffer overflows, security vulnerabilities, memory leaks, timing anomalies (such as race conditions, deadlocks), dead or unused source code segments, and other common programming mistakes.
There are different types of code issues this technology provides, such as errors, warnings, hints, dead code and code smells. All of these issue types are displayed in different highlighting in the Visual Studio code editor, to visually distinguish between them. Issues are also collected in the special Code Issues tool window, which is intended to analyze code issues for the entire solution with filtering, sorting and navigation capability.
Many code issues can be easily fixed with the corresponding code fixes available in the Code Fix hint, shown right inside the code editor. Any issues can also be suppressed for different kinds of scopes like current class, current project, solution or be completely disabled via a single mouse click.
The Code Issues technology is extensible, and it is easy to write your own code issue provider using the DXCore plug-in. For example, you can implement style-checking issues intended to verify the compliance of a given source code to your team coding style guidelines.
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:
- Code Issues technology overview (current post)
- Code Issues types overview
- Code Issues visual presentation
- Code Issues fixes and suppression
- Code Issues navigation techniques
- Code Issues tool window
- Code Issues configuration and options
- Code Issues overall list
- Creating your own code issue