Use pmd
to check for DRY code
#646
Labels
continuous-integration
Continuous integration (CI)
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
We can improve code reuse and prevent it in the future via
pmd
. It is very easy to install and use locally, and it even has some GitHub actions that are ready to go online.The output of the copy-paste detector is frankly quite striking!
./pmd cpd --minimum-tokens=10 -l fortran /Users/spencer/Downloads/mfc/src/simulation/* > ~/Downloads/dry-detector.txt
gives 235 examples of copy/pastes - nondryness - that are 10 tokens or longer in the simulation code alone. (if I check the whole codebase I find 827 violations)The text was updated successfully, but these errors were encountered: