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"
"*. 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.