Package net.sourceforge.pmd.cpd
Class CPDConfiguration
- java.lang.Object
-
- net.sourceforge.pmd.AbstractConfiguration
-
- net.sourceforge.pmd.cpd.CPDConfiguration
-
public class CPDConfiguration extends AbstractConfiguration
- Author:
- Brian Remedios, Romain Pelisse - <belaran@gmail.com>
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_LANGUAGE
static String
DEFAULT_RENDERER
-
Constructor Summary
Constructors Constructor Description CPDConfiguration()
CPDConfiguration(LanguageRegistry languageRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
checkLanguageIsAcceptable(Language lang)
Check that it is correct to use the given language with this configuration.CPDReportRenderer
getCPDReportRenderer()
int
getMinimumTileSize()
String
getRendererName()
static Set<String>
getRenderers()
String
getSkipBlocksPattern()
boolean
isHelp()
boolean
isIgnoreAnnotations()
boolean
isIgnoreIdentifierAndLiteralSequences()
boolean
isIgnoreIdentifiers()
boolean
isIgnoreLiterals()
boolean
isIgnoreLiteralSequences()
boolean
isIgnoreUsings()
boolean
isNoSkipBlocks()
boolean
isSkipDuplicates()
boolean
isSkipLexicalErrors()
Deprecated.This option will be removed.void
setHelp(boolean help)
void
setIgnoreAnnotations(boolean ignoreAnnotations)
void
setIgnoreIdentifierAndLiteralSequences(boolean ignoreIdentifierAndLiteralSequences)
void
setIgnoreIdentifiers(boolean ignoreIdentifiers)
void
setIgnoreLiterals(boolean ignoreLiterals)
void
setIgnoreLiteralSequences(boolean ignoreLiteralSequences)
void
setIgnoreUsings(boolean ignoreUsings)
void
setMinimumTileSize(int minimumTileSize)
void
setNoSkipBlocks(boolean noSkipBlocks)
void
setRendererName(String rendererName)
void
setSkipBlocksPattern(String skipBlocksPattern)
void
setSkipDuplicates(boolean skipDuplicates)
void
setSkipLexicalErrors(boolean skipLexicalErrors)
Deprecated.This option will be removed.void
setSourceEncoding(Charset sourceEncoding)
Set the character encoding of source files.-
Methods inherited from class net.sourceforge.pmd.AbstractConfiguration
addInputPath, addRelativizeRoot, addRelativizeRoots, collectFilesRecursively, collectFilesRecursively, getExcludes, getForceLanguageVersion, getIgnoreFile, getInputFile, getInputPathList, getLanguageProperties, getLanguageRegistry, getLanguageVersionDiscoverer, getLanguageVersionOfFile, getRelativizeRoots, getReporter, getSourceEncoding, getUri, isFailOnError, isFailOnViolation, isForceLanguageVersion, setDefaultLanguageVersion, setDefaultLanguageVersions, setExcludes, setFailOnError, setFailOnViolation, setForceLanguageVersion, setIgnoreFilePath, setInputFilePath, setInputPathList, setInputUri, setOnlyRecognizeLanguage, setReporter
-
-
-
-
Field Detail
-
DEFAULT_LANGUAGE
public static final String DEFAULT_LANGUAGE
- See Also:
- Constant Field Values
-
DEFAULT_RENDERER
public static final String DEFAULT_RENDERER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CPDConfiguration
public CPDConfiguration()
-
CPDConfiguration
public CPDConfiguration(LanguageRegistry languageRegistry)
-
-
Method Detail
-
setSourceEncoding
public void setSourceEncoding(Charset sourceEncoding)
Description copied from class:AbstractConfiguration
Set the character encoding of source files.- Overrides:
setSourceEncoding
in classAbstractConfiguration
- Parameters:
sourceEncoding
- The character encoding.
-
getMinimumTileSize
public int getMinimumTileSize()
-
setMinimumTileSize
public void setMinimumTileSize(int minimumTileSize)
-
isSkipDuplicates
public boolean isSkipDuplicates()
-
setSkipDuplicates
public void setSkipDuplicates(boolean skipDuplicates)
-
getRendererName
public String getRendererName()
-
setRendererName
public void setRendererName(String rendererName)
-
getCPDReportRenderer
public CPDReportRenderer getCPDReportRenderer()
-
isIgnoreLiterals
public boolean isIgnoreLiterals()
-
setIgnoreLiterals
public void setIgnoreLiterals(boolean ignoreLiterals)
-
isIgnoreIdentifiers
public boolean isIgnoreIdentifiers()
-
setIgnoreIdentifiers
public void setIgnoreIdentifiers(boolean ignoreIdentifiers)
-
isIgnoreAnnotations
public boolean isIgnoreAnnotations()
-
setIgnoreAnnotations
public void setIgnoreAnnotations(boolean ignoreAnnotations)
-
isIgnoreUsings
public boolean isIgnoreUsings()
-
setIgnoreUsings
public void setIgnoreUsings(boolean ignoreUsings)
-
isIgnoreLiteralSequences
public boolean isIgnoreLiteralSequences()
-
setIgnoreLiteralSequences
public void setIgnoreLiteralSequences(boolean ignoreLiteralSequences)
-
isIgnoreIdentifierAndLiteralSequences
public boolean isIgnoreIdentifierAndLiteralSequences()
-
setIgnoreIdentifierAndLiteralSequences
public void setIgnoreIdentifierAndLiteralSequences(boolean ignoreIdentifierAndLiteralSequences)
-
isSkipLexicalErrors
@Deprecated public boolean isSkipLexicalErrors()
Deprecated.This option will be removed. WithAbstractConfiguration.isFailOnError()
, you can control whether lexical errors should fail the build or not.
-
setSkipLexicalErrors
@Deprecated public void setSkipLexicalErrors(boolean skipLexicalErrors)
Deprecated.This option will be removed. WithAbstractConfiguration.setFailOnError(boolean)
, you can control whether lexical errors should fail the build or not.
-
isHelp
public boolean isHelp()
-
setHelp
public void setHelp(boolean help)
-
isNoSkipBlocks
public boolean isNoSkipBlocks()
-
setNoSkipBlocks
public void setNoSkipBlocks(boolean noSkipBlocks)
-
getSkipBlocksPattern
public String getSkipBlocksPattern()
-
setSkipBlocksPattern
public void setSkipBlocksPattern(String skipBlocksPattern)
-
checkLanguageIsAcceptable
protected void checkLanguageIsAcceptable(Language lang) throws UnsupportedOperationException
Description copied from class:AbstractConfiguration
Check that it is correct to use the given language with this configuration.- Overrides:
checkLanguageIsAcceptable
in classAbstractConfiguration
- Throws:
UnsupportedOperationException
- if the language isn't supported.
-
-