Use StyleCop for code review
The previous article briefly describes how to use Astyle for code formatting so that the written code has a consistent style. Today, I will briefly introduce how to use StyleCop to review the original code and check whether the written code complies with the design specifications,. Net conventions, and some common usage. Ensure code consistency and readability.
Before that, I would like to briefly introduce FxCop (a tool used internally by Microsoft at first), a tool for analyzing hosted assembly and checking the overall correctness of the Code to tell users where they do not comply with the design specifications. The evaluation rules he uses have been developed for many years and have gathered the knowledge and technology of top. Net Framework developers. However, FxCop is based on managed code analysis, that is, the compiled assembly. The StyleCop we introduced today is also used to check whether the Code complies with the design specifications. It is based on the original code verification and only supports the C # language. It is a tool for code verification during development, I believe that in daily development, we will help you gradually improve and improve your coding standards and awareness while using tools. In addition, we recommend you read this article 《.. Net design specifications -. net convention, usage and model. Okay. Question:
First, download the latest StyleCop.
: Http://stylecop.codeplex.com/
The latest version is StyleCop-4.7.37.0.msi, version 4.7, after the download is complete, start to install, the installation process is very simple, here is not. After the installation is complete, it seems that there is no response, and no relevant menu appears in the Start Menu. It doesn't matter. Open Visual Studio now. Taking Visual Studio2010 as an example, see: