Add collect files recursively configuration option
This commit is contained in:
parent
cebccf754c
commit
71e9ab7f98
1 changed files with 18 additions and 0 deletions
|
@ -353,6 +353,19 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
|||
return cache(Path.of(cache));
|
||||
}
|
||||
|
||||
/**
|
||||
* When specified, any directory mentioned with {@link #inputPaths()} will only be searched for files that are
|
||||
* direct children. By default, subdirectories are recursively included.
|
||||
*
|
||||
* @param collectFilesRecursively whether to collect files recursively or not
|
||||
* @return this operation
|
||||
* @since 1.2.4
|
||||
*/
|
||||
public PmdOperation collectFilesRecursively(boolean collectFilesRecursively) {
|
||||
this.collectFilesRecursively_ = collectFilesRecursively;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default language version to be used for all input files.
|
||||
*
|
||||
|
@ -625,6 +638,11 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
|||
// addRelativizeRoots
|
||||
config.addRelativizeRoots(relativizeRoots_.stream().toList());
|
||||
|
||||
// collectFilesRecursively
|
||||
if (!collectFilesRecursively_) {
|
||||
config.collectFilesRecursively(false);
|
||||
}
|
||||
|
||||
// prependAuxClasspath
|
||||
if (prependClasspath_ != null) {
|
||||
config.prependAuxClasspath(prependClasspath_);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue