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
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintDetermines how many exclusions are considered.booleanisExcludedFromFailure(net.sourceforge.pmd.reporting.RuleViolation errorDetail) Checks whether the givenRuleViolationis excluded.booleanisExcludedFromFailure(Violation errorDetail) Checks whether the given violation is excluded.voidloadExcludeFromFailuresData(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:ExcludeFromFileLoads the exclude definitions from the given file.- Angegeben von:
loadExcludeFromFailuresDatain 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:ExcludeFromFileChecks whether the given violation is excluded. Note: the exclusions must have been loaded before viaExcludeFromFile.loadExcludeFromFailuresData(String).- Angegeben von:
isExcludedFromFailurein SchnittstelleExcludeFromFile<Violation>- Parameter:
errorDetail- the violation to check- Gibt zurück:
trueif the violation should be excluded,falseotherwise.
-
isExcludedFromFailure
public boolean isExcludedFromFailure(net.sourceforge.pmd.reporting.RuleViolation errorDetail) Checks whether the givenRuleViolationis excluded. Note: the exclusions must have been loaded before vialoadExcludeFromFailuresData(String).- Parameter:
errorDetail- the violation to check- Gibt zurück:
trueif the violation should be excluded,falseotherwise.
-
countExclusions
public int countExclusions()Beschreibung aus Schnittstelle kopiert:ExcludeFromFileDetermines how many exclusions are considered.- Angegeben von:
countExclusionsin SchnittstelleExcludeFromFile<Violation>- Gibt zurück:
- the number of active exclusions
-