com.puppycrawl.tools.checkstyle.checks.duplicates
Class StrictDuplicateCodeCheck
- Configurable, Contextualizable, FileSetCheck
public final class StrictDuplicateCodeCheck
Performs a line-by-line comparison of all code lines and reports
duplicate code if a sequence of lines differs only in
indentation. All import statements in Java code are ignored, any
other line - including javadoc, whitespace lines between methods,
etc. - is considered (which is why the check is called
strict).
void | process(File[] aFiles)-
|
void | setBasedir(String aBasedir)
|
void | setMin(int aMin)- Sets the minimum number of lines that must be equivalent
before the check complains.
|
destroy, filter, fireErrors, getCharset, getMessageCollector, getMessageDispatcher, log, log, setCharset, setFileExtensions, setMessageDispatcher |
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity |
StrictDuplicateCodeCheck
public StrictDuplicateCodeCheck()
Creates a new instance of this class.
setBasedir
public void setBasedir(String aBasedir)
aBasedir - the base directory to strip off in filenames
setMin
public void setMin(int aMin)
Sets the minimum number of lines that must be equivalent
before the check complains.
aMin - the number of lines that must be equal before
triggering a 'duplicate code' message.