Package org.sonar.java.checks
Class PrintfFailCheck
-
- All Implemented Interfaces:
JavaCheck
,JavaFileScanner
public class PrintfFailCheck extends AbstractPrintfChecker
-
-
Field Summary
-
Fields inherited from class org.sonar.java.checks.AbstractPrintfChecker
JAVA_LANG_STRING, JAVA_UTIL_LOGGER, JAVA_UTIL_LOGGING_LOGGER, LEVELS, MESSAGE_FORMAT, MESSAGE_FORMAT_PATTERN, ORG_APACHE_LOGGING_LOG4J_LOGGER
-
Fields inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
context
-
-
Constructor Summary
Constructors Constructor Description PrintfFailCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
handleMessageFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
protected void
handleOtherFormatTree(MethodInvocationTree mit, ExpressionTree formatTree)
protected void
handlePrintfFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
protected void
onMethodInvocationFound(MethodInvocationTree mit)
protected void
reportMissingPrevious(MethodInvocationTree mit)
-
Methods inherited from class org.sonar.java.checks.AbstractPrintfChecker
argIndexes, checkFormatting, cleanupDoubleQuote, cleanupLineSeparator, getIndex, getMessageFormatIndexes, getMethodInvocationMatchers, getParameters, isNewArrayWithInitializers
-
Methods inherited from class org.sonar.java.checks.methods.AbstractMethodDetection
nodesToVisit, onConstructorFound, onMethodReferenceFound, visitNode
-
Methods inherited from class org.sonar.plugins.java.api.IssuableSubscriptionVisitor
addIssue, addIssueOnFile, reportIssue, reportIssue, reportIssue, scanTree
-
Methods inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
hasSemantic, leaveFile, leaveNode, scanFile, setContext, visitToken, visitTrivia
-
-
-
-
Method Detail
-
onMethodInvocationFound
protected void onMethodInvocationFound(MethodInvocationTree mit)
- Overrides:
onMethodInvocationFound
in classAbstractMethodDetection
-
handlePrintfFormat
protected void handlePrintfFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
- Specified by:
handlePrintfFormat
in classAbstractPrintfChecker
-
handleMessageFormat
protected void handleMessageFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
- Specified by:
handleMessageFormat
in classAbstractPrintfChecker
-
handleOtherFormatTree
protected void handleOtherFormatTree(MethodInvocationTree mit, ExpressionTree formatTree)
- Specified by:
handleOtherFormatTree
in classAbstractPrintfChecker
-
reportMissingPrevious
protected void reportMissingPrevious(MethodInvocationTree mit)
- Overrides:
reportMissingPrevious
in classAbstractPrintfChecker
-
-