Home > Common Problem > What tools are used to detect and deal with redundant code?

What tools are used to detect and deal with redundant code?

coldplay.xixi
Release: 2020-08-29 11:14:02
Original
3590 people have browsed it

Use the tool Simian for redundant code detection and processing. How to use: First download the latest version and unzip the file; then add the path where simian is located to the windows environment variable path; then add [simian-2.2.24 .exe] file name to [simian.exe] and run it.

What tools are used to detect and deal with redundant code?

Redundant code detection and processing tool Simian, Usage:

Go to Download the latest version from the official website. After downloading, unzip the file and add the path where simian is located to the windows environment variable path. At the same time, change the file name of simian-2.2.24.exe to simian.exe, which is convenient For our use, simian is a command line tool. Just run simian in cmd:

c:\>simian.exe [options] files
Copy after login

The specific usage method is introduced below:

Check all c# files including subdirectories:

"-includes=*.cs"
Copy after login

Check all c# files in the current directory, and only check the code with more than 3 lines of duplicate code

-threshold=3 "*.cs"
Copy after login

Check all c# files:

"*.cs"
Copy after login

If you use the command line output , it is not very convenient to locate the code, you can use the external tool of Visual Studio

If you want to learn more about programming, please pay attention to the php training column!

The above is the detailed content of What tools are used to detect and deal with redundant code?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template