By default, the inspection considers a compile-time constant as a format string if it's used as an argument to the corresponding methods on
java.util.Formatter
, java.lang.String
, java.io.PrintWriter
or java.io.PrintStream
.
Example:
String.format("x = %d, y = %d", 42);
Use the inspection settings to mark additional classes and methods as related to string formatting.