Added support for collections as arguments
This commit is contained in:
parent
357585693a
commit
5c85cddf0d
1 changed files with 48 additions and 4 deletions
|
@ -26,10 +26,7 @@ import rife.bld.operations.AbstractOperation;
|
|||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
@ -162,6 +159,29 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds new rule set paths.
|
||||
* <p>
|
||||
* The built-in rule set paths are:
|
||||
* <ul>
|
||||
* <li>{@code rulesets/java/quickstart.xml}</li>
|
||||
* <li>{@code category/java/bestpractices.xml}</li>
|
||||
* <li>{@code category/java/codestyle.xml}</li>
|
||||
* <li>{@code category/java/design.xml}</li>
|
||||
* <li>{@code category/java/documentation.xml}</li>
|
||||
* <li>{@code category/java/errorprone.xml}</li>
|
||||
* <li>{@code category/java/multithreading.xml}</li>
|
||||
* <li>{@code category/java/performance.xml}</li>
|
||||
* <li>{@code category/java/security.xml}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see #ruleSets(Collection)
|
||||
*/
|
||||
public PmdOperation addRuleSet(Collection<String> ruleSet) {
|
||||
ruleSets.addAll(ruleSet);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the location of the cache file for incremental analysis.
|
||||
*/
|
||||
|
@ -421,6 +441,30 @@ public class PmdOperation extends AbstractOperation<PmdOperation> {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the rule set path(s), disregarding any previously set paths.
|
||||
* <p>
|
||||
* The built-in rule set paths are:
|
||||
* <ul>
|
||||
* <li>{@code rulesets/java/quickstart.xml}</li>
|
||||
* <li>{@code category/java/bestpractices.xml}</li>
|
||||
* <li>{@code category/java/codestyle.xml}</li>
|
||||
* <li>{@code category/java/design.xml}</li>
|
||||
* <li>{@code category/java/documentation.xml}</li>
|
||||
* <li>{@code category/java/errorprone.xml}</li>
|
||||
* <li>{@code category/java/multithreading.xml}</li>
|
||||
* <li>{@code category/java/performance.xml}</li>
|
||||
* <li>{@code category/java/security.xml}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see #addRuleSet(Collection)
|
||||
*/
|
||||
public PmdOperation ruleSets(Collection<String> ruleSet) {
|
||||
ruleSets.clear();
|
||||
ruleSets.addAll(ruleSet);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disables adding the suppressed rule violations to the report.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue