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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a single rule to the setvoidaddRules(Collection<String> rules)Add a set of rules to the setstatic booleanDetermines whether the given line is a comment or not based on scanning for prefixesbooleanisEmpty()Returnstrueif this IgnoreMatcher contains no rules.isIgnoredFile(String filename)Checks if the file matches the stored expressions.voidParses 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- ifnullor 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:
trueif the given line is a commented out line.- See Also:
COMMENT_PREFIXES
-
getExclusionLines
-
isEmpty
public boolean isEmpty()Description copied from interface:IgnoreMatcherReturnstrueif this IgnoreMatcher contains no rules.- Specified by:
isEmptyin interfaceIgnoreMatcher- Returns:
trueif this IgnoreMatcher contains no rules
-
isIgnoredFile
Description copied from interface:IgnoreMatcherChecks if the file matches the stored expressions.- Specified by:
isIgnoredFilein interfaceIgnoreMatcher- Parameters:
filename- The filename to be checked- Returns:
- empty: not matched, True: must be ignored, False: it must be UNignored
-