When working on a project, some files must not be checked, for example, test
or generated code.
It would then be usefull to be able to filter out some files, based on their
path name. Just like the "--files" option, one could specify a folder or a
specific file to discard.
Hello,
When working on a project, some files must not be checked, for example, test
or generated code.
It would then be usefull to be able to filter out some files, based on their
path name. Just like the "--files" option, one could specify a folder or a
specific file to discard.
Examples:
--exclude=/path/to/generated/
--exclude=myfile.cpp
Best regards,
Remi
I can't check for now, but I'm pretty sure those options exist. Did you chek
the help text of CPD ?
Help text shows:
Usage:
java net.sourceforge.pmd.cpd.CPD --minimum-tokens xxx --files xxx
i.e:
java net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --files
c:\jdk14\src\java
or:
java net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --files /path/to/c/code
--language c
or:
java net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --encoding UTF-16LE
--files /path/to/java/code --format xml
Also, looking at CPD.java from the 5.0-java release, I am pretty sure this is
not done. I did not check the latest code, though.
Patch has been submitted at https://sourceforge.net/tracker/?func=detail&aid=
3497067&group_id=56262&atid=479923
Cheers,
Remi
It would be nice if exclude filter supports regular expression of file mask.
For example --exclude "*/Designer.cs"