Code analysis
JetBrains Rider helps you analyze code on various levels, starting from a single statement in the editor and all the way through to the architecture of your entire solution.
Find code issues
JetBrains Rider provides static code analysis (also known as code inspection) by applying over 2500 code inspections in C#, VB.NET, XAML, XML, ASP.NET, ASP.NET MVC, Razor, JavaScript, TypeScript, HTML, CSS, ResX, and build script code, detecting compiler and runtime errors, suggesting corrections and improvements before you even compile.
By default, JetBrains Rider starts analyzing a code file as soon as you open it in the editor, all the way you edit it, until it is closed. This design time inspection is performed silently by continuously applying all code inspections to your code. Not only JetBrains Rider highlights code issues right in the editor according to their severity levels, it also provides commands for navigation between code issues.
If necessary, you can run code inspection for a specific project or the entire solution and check the list of issues found in the specified scope.
Also, you can enable the Solution-wide analysis that will detect all errors in your entire solution and extend the list of code inspections in the current file (for example it will find unused public members).
If needed, you can use code annotations to customize the way JetBrains Rider inspects your code.
Quick-fixes for code issues
JetBrains Rider helps you resolve most of the discovered code issues automatically. All you need is to press Alt+Enter when the caret is on a code issue highlighted in the editor and check the suggested quick-fixes.
Code exploration
JetBrains Rider also provides features that do not detect code issues automatically, but rather allow you to find potential problems yourself by deeper investigation of the code. For instance, you can study call chains and find origin and destinations of a specific value. For more information about these features, refer to the Code exploration section.
Keyboard shortcuts
You can use the following shortcuts for code analysis features:
Code analysis
Alt+Enter | |
Control+F1 | |
F2 | |
Shift+F2 | |
Alt+F2 | |
Alt+Shift+F2 | |
Control+Alt+Shift+8 | |
Control+Alt+Shift+I | |
Control+Alt+Shift+A | |
Alt+6 |
For the full list of JetBrains Rider keyboard shortcuts, refer to Keyboard shortcuts in predefined keymaps.