Use StyleCop for code review

Source: Internet
Author: User
Tags coding standards

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.