Simian, a redundant code Check Tool

Source: Internet
Author: User
Tags dotnet

Kobe, a development example of Microsoft Web2.0, repeats the same mistakes of oxite. Ayende successively published five high-quality Kobe discussion posts:

  • Kobe-in the nuts & bolts and don't really liking it
  • Kobe-Data Access done wrong
  • Kobe-when the documentation is the only delivery that matters
  • Kobe-an example of exception handling done wrong
  • Kobe-custom tural Overview

Ayende uses the simian tool to perform static analysis on the Code and finds that a total of 873 lines of code are duplicated in the 5138 methods in 67 files. Go to the topic and introduce simian, a redundant code check tool. The current version is 2.2.24. It is not only C # code, but also can be used to check C, C ++, COBOL, Ruby, code in JSP, ASP, HTML, XML, and Visual Basic formats. Simian is not a free tool. If you use it to check open-source code or non-commercial code, it is free to use. If it is a commercial application, you will have to pay for it.

Usage:

In this way, we can use simian as a command line tool. Run simian in cmd:

C: \> simian.exe [Options] files

The following describes how to use it:
  • Check all C # files in subdirectories:

"-Supported des = *. cs"

  • Check all the C # files in the current directory, and only check the repeated code with more than three lines of code.

-Threshold = 3 "*. cs"

  • Check all C # files:

"*. Cs"

Using command line output is not very convenient for code locating, and you can use a tool named monkeywrangler written by Visual Studio's external tool (see http://blogs.conchango.com/howardvanrooijen/archive/2006/02/08/2776.aspx) or Howard van rooijen's. You can also integrate it into continuous integration. For more information, see install the DOTNET continuous integration environment building and configuration, and configure the DOTNET continuous integration environment.

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.