Skip to content

Commit a9f0276

Browse files
author
Polina Volkhontseva
committedApr 6, 2022
Excluding files from PMD checking.
1 parent 1d90255 commit a9f0276

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎qulice-pmd/src/main/java/com/qulice/pmd/PmdValidator.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ public Collection<Violation> validate(final Collection<File> files) {
6565
final SourceValidator validator = new SourceValidator(this.env);
6666
final Collection<DataSource> sources = new LinkedList<>();
6767
for (final File file : files) {
68-
sources.add(new FileDataSource(file));
68+
final String name = file.getPath().substring(
69+
this.env.basedir().toString().length()
70+
);
71+
if (!this.env.exclude("pmd", name)) {
72+
sources.add(new FileDataSource(file));
73+
}
6974
}
7075
final Collection<RuleViolation> breaches = validator.validate(
7176
sources, this.env.basedir().getPath()

0 commit comments

Comments
 (0)
Please sign in to comment.