Package org.sonar.java.checks
Class PrintfFailCheck
- All Implemented Interfaces:
JavaCheck,JavaFileScanner
-
Field Summary
Fields inherited from class org.sonar.java.checks.AbstractPrintfChecker
JAVA_LANG_STRING, JAVA_LANG_THROWABLE, LEVELS, MESSAGE_FORMAT, MESSAGE_FORMAT_PATTERN, MESSAGE_FORMAT_PATTERN_PREDICATE, ORG_APACHE_LOGGING_LOG4J_LOGGER, PRINTF_METHOD_NAME, STRING_FORMATTEDFields inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 voidhandlePrintfFormatCatchingErrors(MethodInvocationTree mit, String formatString, List<ExpressionTree> args) protected voidprotected voidMethods inherited from class org.sonar.java.checks.AbstractPrintfChecker
argIndexes, checkArgumentNumber, checkFormatting, cleanupDoubleQuote, cleanupLineSeparator, getIndex, getMessageFormatIndexes, getMethodInvocationMatchers, getParameters, isNewArrayWithInitializers, transposeArgumentArray, verifyParametersForErrorsMethods inherited from class org.sonar.java.checks.methods.AbstractMethodDetection
nodesToVisit, onConstructorFound, onMethodReferenceFound, visitNodeMethods inherited from class org.sonar.plugins.java.api.IssuableSubscriptionVisitor
addIssue, addIssueOnFile, leaveFile, reportIssue, reportIssue, reportIssue, scanFile, scanTree, setContextMethods inherited from class org.sonar.java.ast.visitors.SubscriptionVisitor
leaveNode, visitToken, visitTriviaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sonar.plugins.java.api.JavaFileScanner
scanWithoutParsing
-
Constructor Details
-
PrintfFailCheck
public PrintfFailCheck()
-
-
Method Details
-
onMethodInvocationFound
- 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
-
handlePrintfFormatCatchingErrors
protected void handlePrintfFormatCatchingErrors(MethodInvocationTree mit, String formatString, List<ExpressionTree> args) - Specified by:
handlePrintfFormatCatchingErrorsin classAbstractPrintfChecker
-
handleOtherFormatTree
protected void handleOtherFormatTree(MethodInvocationTree mit, ExpressionTree formatTree, List<ExpressionTree> args) - Specified by:
handleOtherFormatTreein classAbstractPrintfChecker
-
reportMissingPrevious
- Overrides:
reportMissingPreviousin classAbstractPrintfChecker
-