Package org.apache.rat.mp.util.ignore
Class GlobIgnoreMatcher
java.lang.Object
org.apache.rat.mp.util.ignore.GlobIgnoreMatcher
- All Implemented Interfaces:
IgnoreMatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a single rule to the setvoid
addRules(Collection<String> rules)
Add a set of rules to the setstatic boolean
Determines whether the given line is a comment or not based on scanning for prefixesboolean
isEmpty()
Returnstrue
if this IgnoreMatcher contains no rules.isIgnoredFile(String filename)
Checks if the file matches the stored expressions.void
Parses excludes from the given SCM ignore file.
-
Constructor Details
-
GlobIgnoreMatcher
public GlobIgnoreMatcher() -
GlobIgnoreMatcher
-
-
Method Details
-
addRule
Add a single rule to the set- Parameters:
rule
- The line that matches some files
-
addRules
Add a set of rules to the set- Parameters:
rules
- The line that matches some files
-
loadFile
Parses excludes from the given SCM ignore file.- Parameters:
log
- Maven log to show output during RAT runs.scmIgnore
- ifnull
or invalid an empty list of exclusions is returned.
-
isComment
Determines whether the given line is a comment or not based on scanning for prefixes- Parameters:
line
- line to verify.- Returns:
true
if the given line is a commented out line.- See Also:
COMMENT_PREFIXES
-
getExclusionLines
-
isEmpty
public boolean isEmpty()Description copied from interface:IgnoreMatcher
Returnstrue
if this IgnoreMatcher contains no rules.- Specified by:
isEmpty
in interfaceIgnoreMatcher
- Returns:
true
if this IgnoreMatcher contains no rules
-
isIgnoredFile
Description copied from interface:IgnoreMatcher
Checks if the file matches the stored expressions.- Specified by:
isIgnoredFile
in interfaceIgnoreMatcher
- Parameters:
filename
- The filename to be checked- Returns:
- empty: not matched, True: must be ignored, False: it must be UNignored
-