public class CheckstyleTestMakeupCheck
extends com.puppycrawl.tools.checkstyle.api.AbstractCheck
Custom check to ensure Checkstyle tests are designed correctly.
Rationale: This check was made to ensure tests follow a specific design implementation so 3rd party utilities like the regression utility can parse the tests for information used in creating regression reports.
Check have following options:
create(Root|Module)Config|getModuleConfig.verify(Warns|Suppressed)?.To configure the check to report incorrectly made checkstyle tests:
<module name="CheckstyleTestMakeup"/>
| Modifier and Type | Field and Description |
|---|---|
static String |
MSG_KEY_CONFIG_NOT_ASSIGNED
Violations message.
|
static String |
MSG_KEY_CONFIG_NOT_ASSIGNED_PROPERLY
Violations message.
|
static String |
MSG_KEY_CONFIG_NOT_ASSIGNED_WITH
Violations message.
|
static String |
MSG_KEY_CONFIG_NOT_FOUND
Violations message.
|
static String |
MSG_KEY_UNKNOWN_PROPERTY
Violations message.
|
| Constructor and Description |
|---|
CheckstyleTestMakeupCheck() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTree(com.puppycrawl.tools.checkstyle.api.DetailAST rootAST) |
int[] |
getAcceptableTokens() |
int[] |
getDefaultTokens() |
int[] |
getRequiredTokens() |
void |
leaveToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast) |
void |
setCreateMethodRegexp(Pattern createMethodRegexp)
Setter for
createMethodRegexp. |
void |
setVerifyMethodRegexp(Pattern verifyMethodRegexp)
Setter for
verifyMethodRegexp. |
void |
visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast) |
clearMessages, destroy, finishTree, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, log, setFileContents, setTabWidth, setTokensfinishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeveritypublic static final String MSG_KEY_CONFIG_NOT_ASSIGNED
public static final String MSG_KEY_CONFIG_NOT_ASSIGNED_WITH
public static final String MSG_KEY_CONFIG_NOT_ASSIGNED_PROPERLY
public static final String MSG_KEY_UNKNOWN_PROPERTY
public static final String MSG_KEY_CONFIG_NOT_FOUND
public void setCreateMethodRegexp(Pattern createMethodRegexp)
createMethodRegexp.createMethodRegexp - The value to set.public void setVerifyMethodRegexp(Pattern verifyMethodRegexp)
verifyMethodRegexp.verifyMethodRegexp - The value to set.public int[] getDefaultTokens()
getDefaultTokens in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic int[] getAcceptableTokens()
getAcceptableTokens in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic int[] getRequiredTokens()
getRequiredTokens in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic void beginTree(com.puppycrawl.tools.checkstyle.api.DetailAST rootAST)
beginTree in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
visitToken in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic void leaveToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
leaveToken in class com.puppycrawl.tools.checkstyle.api.AbstractCheckCopyright © 2021. All rights reserved.