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_LANG_THROWABLE, JAVA_UTIL_LOGGER_LOG_LEVEL_STRING, JAVA_UTIL_LOGGER_LOG_LEVEL_STRING_ANY, JAVA_UTIL_LOGGER_LOG_MATCHER, JAVA_UTIL_LOGGING_LOGGER, LEVELS, MESSAGE_FORMAT, MESSAGE_FORMAT_PATTERN, ORG_APACHE_LOGGING_LOG4J_LOGGER, ORG_SLF4J_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 voidhandleMessageFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)protected voidhandleOtherFormatTree(MethodInvocationTree mit, ExpressionTree formatTree, List<ExpressionTree> args)protected voidhandlePrintfFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)protected voidonMethodInvocationFound(MethodInvocationTree mit)protected voidreportMissingPrevious(MethodInvocationTree mit)-
Methods inherited from class org.sonar.java.checks.AbstractPrintfChecker
argIndexes, checkFormatting, cleanupDoubleQuote, cleanupLineSeparator, getIndex, getMessageFormatIndexes, getMethodInvocationMatchers, getParameters, isLastArgumentThrowable, isLoggingMethod, isNewArrayWithInitializers, transposeArgumentArrayAndRemoveThrowable
-
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:
onMethodInvocationFoundin classAbstractMethodDetection
-
handlePrintfFormat
protected void handlePrintfFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
- Specified by:
handlePrintfFormatin classAbstractPrintfChecker
-
handleMessageFormat
protected void handleMessageFormat(MethodInvocationTree mit, String formatString, List<ExpressionTree> args)
- Specified by:
handleMessageFormatin classAbstractPrintfChecker
-
handleOtherFormatTree
protected void handleOtherFormatTree(MethodInvocationTree mit, ExpressionTree formatTree, List<ExpressionTree> args)
- Specified by:
handleOtherFormatTreein classAbstractPrintfChecker
-
reportMissingPrevious
protected void reportMissingPrevious(MethodInvocationTree mit)
- Overrides:
reportMissingPreviousin classAbstractPrintfChecker
-
-