Utility methods for code rule filters.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.util.BitSet |
getIntegerSetAttribute(groovy.util.Node pNode, java.lang.String pAttribute) |
|
static java.util.Collection<RuleViolationMatcher> |
loadXmlFile(java.io.File pFile)Load an XML file containing one or more rule violation filters. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Load an XML file containing one or more rule violation filters. The file has the following format:
A rule violation filter element has one mandatory attribute, files, that contains a regular expression specifying the file name(s) that the filter applies to....
The optional rules attribute contains a regular expression specifying the names of the rules that the filter applies to. If this attribute isn't specified, all rules are filtered out in the (parts of) the file(s) specified.
The lines attribute contains a comma-separated list of line numbers and line number ranges that specify the lines of the file(s) that the filter should be applied to. If this attribute isn't specified, the filter applies to the entire file(s).
Examples
Filter out rule "r1" in file "AAA.java":
Filter out rule "r1" in file ".XXX.java" at lines 2, 5 and 130-156:
Filter out all rules between lines 17 and 26 in file "Dummy.java":
Filter out rules "r1" and "r3" in files matching the pattern ".*Parser.*\.java":
Filter out everything in files matching the pattern ".*Test.*\.java":
pFile - The file to load.RuleViolationMatcher instances, empty if the load fails.