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 - <[email protected]>
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_LANGUAGEstatic StringDEFAULT_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 voidcheckLanguageIsAcceptable(Language lang)Check that it is correct to use the given language with this configuration.CPDReportRenderergetCPDReportRenderer()intgetMinimumTileSize()StringgetRendererName()static Set<String>getRenderers()StringgetSkipBlocksPattern()booleanisHelp()booleanisIgnoreAnnotations()booleanisIgnoreIdentifierAndLiteralSequences()booleanisIgnoreIdentifiers()booleanisIgnoreLiterals()booleanisIgnoreLiteralSequences()booleanisIgnoreUsings()booleanisNoSkipBlocks()booleanisSkipDuplicates()booleanisSkipLexicalErrors()Deprecated.This option will be removed.voidsetHelp(boolean help)voidsetIgnoreAnnotations(boolean ignoreAnnotations)voidsetIgnoreIdentifierAndLiteralSequences(boolean ignoreIdentifierAndLiteralSequences)voidsetIgnoreIdentifiers(boolean ignoreIdentifiers)voidsetIgnoreLiterals(boolean ignoreLiterals)voidsetIgnoreLiteralSequences(boolean ignoreLiteralSequences)voidsetIgnoreUsings(boolean ignoreUsings)voidsetMinimumTileSize(int minimumTileSize)voidsetNoSkipBlocks(boolean noSkipBlocks)voidsetRendererName(String rendererName)voidsetSkipBlocksPattern(String skipBlocksPattern)voidsetSkipDuplicates(boolean skipDuplicates)voidsetSkipLexicalErrors(boolean skipLexicalErrors)Deprecated.This option will be removed.voidsetSourceEncoding(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:AbstractConfigurationSet the character encoding of source files.- Overrides:
setSourceEncodingin 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:AbstractConfigurationCheck that it is correct to use the given language with this configuration.- Overrides:
checkLanguageIsAcceptablein classAbstractConfiguration- Throws:
UnsupportedOperationException- if the language isn't supported.
-
-