Package org.apache.maven.plugins.pmd
Klasse ExcludeViolationsFromFile
java.lang.Object
org.apache.maven.plugins.pmd.ExcludeViolationsFromFile
- Alle implementierten Schnittstellen:
ExcludeFromFile<Violation>
This class contains utility for loading property files, which define which PMD violations
from which classes should be ignored and not cause a failure.
See property
pmd.excludeFromFailureFile
.- Autor:
- Andreas Dangel
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Determines how many exclusions are considered.boolean
isExcludedFromFailure
(net.sourceforge.pmd.reporting.RuleViolation errorDetail) Checks whether the givenRuleViolation
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.
-
Konstruktordetails
-
ExcludeViolationsFromFile
public ExcludeViolationsFromFile()
-
-
Methodendetails
-
loadExcludeFromFailuresData
public void loadExcludeFromFailuresData(String excludeFromFailureFile) throws org.apache.maven.plugin.MojoExecutionException Beschreibung aus Schnittstelle kopiert:ExcludeFromFile
Loads the exclude definitions from the given file.- Angegeben von:
loadExcludeFromFailuresData
in SchnittstelleExcludeFromFile<Violation>
- Parameter:
excludeFromFailureFile
- the path to the properties file- Löst aus:
org.apache.maven.plugin.MojoExecutionException
- if the properties file couldn't be loaded
-
isExcludedFromFailure
Beschreibung aus Schnittstelle kopiert:ExcludeFromFile
Checks whether the given violation is excluded. Note: the exclusions must have been loaded before viaExcludeFromFile.loadExcludeFromFailuresData(String)
.- Angegeben von:
isExcludedFromFailure
in SchnittstelleExcludeFromFile<Violation>
- Parameter:
errorDetail
- the violation to check- Gibt zurück:
true
if the violation should be excluded,false
otherwise.
-
isExcludedFromFailure
public boolean isExcludedFromFailure(net.sourceforge.pmd.reporting.RuleViolation errorDetail) Checks whether the givenRuleViolation
is excluded. Note: the exclusions must have been loaded before vialoadExcludeFromFailuresData(String)
.- Parameter:
errorDetail
- the violation to check- Gibt zurück:
true
if the violation should be excluded,false
otherwise.
-
countExclusions
public int countExclusions()Beschreibung aus Schnittstelle kopiert:ExcludeFromFile
Determines how many exclusions are considered.- Angegeben von:
countExclusions
in SchnittstelleExcludeFromFile<Violation>
- Gibt zurück:
- the number of active exclusions
-