CodeRush provides a powerful static analysis tool. It detects possible issues in your code and helps you correct them. The list of supported issue types is available in the Analyzers Library article.
You can analyze your code using these two approaches:
The Code Issues window is designed to simplify the static analysis process. Open the CodeRush | Code Analysis menu and choose the Code Issues menu item to invoke the Code Issues window.
The Code Issues window supports two operation modes:
The Analyzer Set Selector on the toolbar allows you to switch between these modes. To analyze a current solution using the specified set of analyzers, use the Refresh button. You can export a report to plain text or an XML file using the Export toolbar button.
If your solution is very large, the analyzing process may take significant time. In this case, consider running Static Code Analysis for the active project or file only. Use the CodeRush | Code Analysis | Analyze Active Project or Analyze Active Document menu items for this.
The CodeRush Diagnostics can be integrated into Visual Studio, which enables you to analyze your code on the fly.
You can instantly see code issues in the Error List window by checking the required analyzers' Register in VS checkbox on the Editor | <Language> | Code Analysis | Code Issues Catalog options page. This options page can be accessed using the CodeRush | Code Analysis | Configure... Visual Studio menu item.
Background Analysis is a resource-demanding feature. Use it with caution on large solutions.
You can suppress certain Analyzers using the Code Actions Menu invoked on a line of code with a Code Issue.
There are two types of suppression:
The analyzer set for Visual Studio's Error List window can be configured for the entire project. You can disable some analyzers permanently or change their severity. Right-click <Your project> | References | Analyzers in the Solution Explorer to configure the project's analyzer set.