duplicates package added to checkstyle_packages.xml Added file filtering to StrickDuplicateCodeCheck

This commit is contained in:
Oleg Sukhodolsky 2003-08-02 12:05:49 +00:00
parent cd89321522
commit ce1a536b29
3 changed files with 4 additions and 2 deletions

View File

@ -191,7 +191,7 @@ public final class StrictDuplicateCodeCheck extends AbstractFileSetCheck
long start = System.currentTimeMillis();
mLoc = 0;
mDuplicates = 0;
mFiles = aFiles;
mFiles = filter(aFiles);
mLineChecksums = new long[mFiles.length][];
mSortedRelevantChecksums = new long[mFiles.length][];
@ -199,7 +199,7 @@ public final class StrictDuplicateCodeCheck extends AbstractFileSetCheck
LOG.debug("Reading input files");
}
for (int i = 0; i < aFiles.length; i++) {
for (int i = 0; i < mFiles.length; i++) {
try {
File file = mFiles[i];
String[] lines = Utils.getLines(file.getPath());

View File

@ -10,6 +10,7 @@
<package name="blocks"/>
<package name="coding"/>
<package name="design"/>
<package name="duplicates"/>
<package name="imports"/>
<package name="indentation"/>
<package name="j2ee"/>

View File

@ -55,6 +55,7 @@ public class PackageNamesLoaderTest extends TestCase
"com.puppycrawl.tools.checkstyle.checks.blocks.",
"com.puppycrawl.tools.checkstyle.checks.coding.",
"com.puppycrawl.tools.checkstyle.checks.design.",
"com.puppycrawl.tools.checkstyle.checks.duplicates.",
"com.puppycrawl.tools.checkstyle.checks.imports.",
"com.puppycrawl.tools.checkstyle.checks.indentation.",
"com.puppycrawl.tools.checkstyle.checks.j2ee.",