Fix exclude and excludeRegex arguments

This commit is contained in:
Erik C. Thauvin 2025-03-25 11:55:53 -07:00
parent 91a113ed5a
commit 4e373bfd10
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 12 additions and 10 deletions

View file

@ -250,7 +250,8 @@ public class CheckstyleOperation extends AbstractProcessOperation<CheckstyleOper
if (!exclude_.isEmpty()) {
for (var e : exclude_) {
if (e.exists()) {
args.add("-e " + e.getAbsolutePath());
args.add("-e");
args.add(e.getAbsolutePath());
}
}
}
@ -258,7 +259,8 @@ public class CheckstyleOperation extends AbstractProcessOperation<CheckstyleOper
if (!excludeRegex_.isEmpty()) {
for (var e : excludeRegex_) {
if (isNotBlank(e)) {
args.add("-x " + e);
args.add("-x");
args.add(e);
}
}
}