provide human message for SuppressWarningsHolder, #1158
This commit is contained in:
parent
0ff261c5ac
commit
5844ab2d34
|
|
@ -40,6 +40,13 @@ import java.util.Map;
|
|||
*/
|
||||
public class SuppressWarningsHolder
|
||||
extends Check {
|
||||
|
||||
/**
|
||||
* A key is pointing to the warning message text in "messages.properties"
|
||||
* file.
|
||||
*/
|
||||
public static final String MSG_KEY = "suppress.warnings.invalid.target";
|
||||
|
||||
/**
|
||||
* Optional prefix for warning suppressions that are only intended to be
|
||||
* recognized by checkstyle. For instance, to suppress {@code
|
||||
|
|
@ -244,7 +251,7 @@ public class SuppressWarningsHolder
|
|||
|
||||
|
||||
if (targetAST == null) {
|
||||
log(ast, "suppress.warnings.invalid.target");
|
||||
log(ast.getLineNo(), MSG_KEY);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,3 +28,5 @@ properties.duplicateproperty=Duplicated property ''{0}'' ({1} occurrence(s)).
|
|||
unable.open.cause=Unable to open ''{0}'': {1}.
|
||||
|
||||
forbid.escaped.unicode.char=Unicode escape(s) usage should be avoided.
|
||||
|
||||
suppress.warnings.invalid.target=Invalid target for @SuppressWarnings.
|
||||
|
|
|
|||
Loading…
Reference in New Issue