Console application, detects Long Method, Long Parameter List, and structurally Duplicated Code in a .cpp file. Created for Software Refactoring and Design course at Seattle University.
Given a valid .cpp file, the detector will can run the following code smell detection methods on any or all methods provided.
- Long Method Threshold metric = more than 15 lines of code. Excludes blank lines.
- Long Parameter List
- Threshold metric = greater than 3 parameters.
- Duplicated Code (structural only)
- Threshold metric = Hamming index greater than 0.75.
- C++ 17+ , CMake 17, g++ 10.2.0
To build and run from source folder:
$ cmake .
$ g++ main.cpp -o myDetector
$./myDetector <filepath>
To build and run in separate build folder:
mkdir build
$ cmake -S . -B ./build
$ g++ main.cpp -o myDetector
$./myDetector <filepath>