public class ExcludeViolationsFromFile extends Object implements ExcludeFromFile<Violation>
pmd.excludeFromFailureFile
.Constructor and Description |
---|
ExcludeViolationsFromFile() |
Modifier and Type | Method and Description |
---|---|
int |
countExclusions()
Determines how many exclusions are considered.
|
boolean |
isExcludedFromFailure(net.sourceforge.pmd.reporting.RuleViolation errorDetail)
Checks whether the given
RuleViolation is excluded. |
boolean |
isExcludedFromFailure(Violation errorDetail)
Checks whether the given violation is excluded.
|
void |
loadExcludeFromFailuresData(String excludeFromFailureFile)
Loads the exclude definitions from the given file.
|
public void loadExcludeFromFailuresData(String excludeFromFailureFile) throws org.apache.maven.plugin.MojoExecutionException
ExcludeFromFile
loadExcludeFromFailuresData
in interface ExcludeFromFile<Violation>
excludeFromFailureFile
- the path to the properties fileorg.apache.maven.plugin.MojoExecutionException
- if the properties file couldn't be loadedpublic boolean isExcludedFromFailure(Violation errorDetail)
ExcludeFromFile
ExcludeFromFile.loadExcludeFromFailuresData(String)
.isExcludedFromFailure
in interface ExcludeFromFile<Violation>
errorDetail
- the violation to checktrue
if the violation should be excluded, false
otherwise.public boolean isExcludedFromFailure(net.sourceforge.pmd.reporting.RuleViolation errorDetail)
RuleViolation
is excluded. Note: the exclusions must have been
loaded before via loadExcludeFromFailuresData(String)
.errorDetail
- the violation to checktrue
if the violation should be excluded, false
otherwise.public int countExclusions()
ExcludeFromFile
countExclusions
in interface ExcludeFromFile<Violation>
Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.