CobolCheck.reportIssue(String),
see bellow @deprecated comments for more details@Deprecated public abstract class CobolAstCheck extends CobolCheck implements org.sonar.squid.api.CodeCheck
grammar| Constructor and Description |
|---|
CobolAstCheck()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getKey()
Deprecated.
not used, return getClass().getSimpleName() (it will be removed in SonarCobol 5.0)
|
protected void |
log(File copybookFile,
String messageText,
int line,
Object... messageParameters)
Deprecated.
Use:
If "messageParameters" exists, format the message using: |
protected void |
log(String messageText,
AstNode node,
Object... messageParameters)
Deprecated.
Use:
If "messageParameters" exists, format the message using: |
protected void |
log(String messageText,
int line,
Object... messageParameters)
Deprecated.
Use:
If "messageParameters" exists, format the message using: |
protected void |
log(String messageText,
Token token,
Object... messageParameters)
Deprecated.
Use:
If "messageParameters" exists, format the message using: |
protected void |
logOnTokenWithCost(Token token,
Double cost,
String messageText,
Object... messageParameters)
Deprecated.
Use:
If "messageParameters" exists, format the message using: |
protected void |
logWithCost(AstNode node,
Double cost,
String messageText,
Object... messageParameters)
Deprecated.
Use:
If "messageParameters" exists, format the message using: |
protected void |
logWithCost(int line,
Double cost,
String messageText,
Object... messageParameters)
Deprecated.
Use:
If "messageParameters" exists, format the message using: |
static Collection<Class> |
toClassCollection(CobolAstCheck[] checks)
Deprecated.
not used (it will be removed in SonarCobol 5.0)
|
reportIssue, setIssueRepositoryaddSourceCode, destroy, getAstNodeTypesToVisit, getCharset, getCicsGrammar, getCobolFile, getCobolGrammar, getComments, getExecutionFlow, getFile, getSqlGrammar, getSymbolTable, init, leaveFile, leaveNode, peekSourceCode, popSourceCode, processMetrics, setCharset, setCobolFile, setComments, setExecutionFlow, setFile, setGrammar, setSourceCodeStack, setSymbolTable, subscribeTo, visitFile, visitNode@Deprecated protected void log(String messageText, AstNode node, Object... messageParameters)
If "messageParameters" exists, format the message using:
String message = MessageFormat.format(messageText, messageParameters);
To still report at line level, use:
Token token = node.getToken();
reportIssue(message).atLine(token.getFile(), token.getLine());
To benefit from precise location, use:
reportIssue(message).on(node);
messageText - message to lognode - AST node associated to this message. Used to associate the message to a line number.messageParameters - option message's parameters (see the java.text.MessageFormat class of the java API)@Deprecated protected void log(String messageText, Token token, Object... messageParameters)
If "messageParameters" exists, format the message using:
String message = MessageFormat.format(messageText, messageParameters);
To still report at line level, use:
reportIssue(message).atLine(token.getFile(), token.getLine());
To benefit from precise location, use:
reportIssue(message).on(token);
messageText - message to logtoken - token associated to this message. Used to associate the message to a line number.messageParameters - option message's parameters (see the java.text.MessageFormat class of the java API)@Deprecated protected final void log(String messageText, int line, Object... messageParameters)
If "messageParameters" exists, format the message using:
String message = MessageFormat.format(messageText, messageParameters);
Report the issue:
reportIssue(message).atLine(line);
messageText - message to logline - line number to associate this violation to. if the line value is < 0, the violation is just associated to the source file.messageParameters - option message's parameters (see the java.text.MessageFormat class of the java API)@Deprecated protected final void log(@Nullable File copybookFile, String messageText, int line, Object... messageParameters)
If "messageParameters" exists, format the message using:
String message = MessageFormat.format(messageText, messageParameters);
Report the issue:
reportIssue(message).atLine(copybookFile, line);
copybookFile - copybook filemessageText - message to logline - line number to associate this violation to. if the line value is < 0, the violation is just associated to the source file.messageParameters - option message's parameters (see the java.text.MessageFormat class of the java API)@Deprecated protected void logOnTokenWithCost(Token token, @Nullable Double cost, String messageText, Object... messageParameters)
If "messageParameters" exists, format the message using:
String message = MessageFormat.format(messageText, messageParameters);
To still report at line level, use:
reportIssue(message).atLine(token.getFile(), token.getLine()).withGap(cost);
To benefit from precise location, use:
reportIssue(message).on(token).withGap(cost);
token - token associated to this message. Used to associate the message to a line number.cost - remediation costmessageText - message to logmessageParameters - option message's parameters (see the java.text.MessageFormat class of the java API)@Deprecated protected void logWithCost(AstNode node, @Nullable Double cost, String messageText, Object... messageParameters)
If "messageParameters" exists, format the message using:
String message = MessageFormat.format(messageText, messageParameters);
To still report at line level, use:
Token token = node.getToken();
reportIssue(message).atLine(token.getFile(), token.getLine()).withGap(cost);
To benefit from precise location, use:
reportIssue(message).on(node).withGap(cost);
node - AST node associated to this message. Used to associate the message to a line number.cost - remediation costmessageText - message to logmessageParameters - option message's parameters (see the java.text.MessageFormat class of the java API)@Deprecated protected final void logWithCost(int line, @Nullable Double cost, String messageText, Object... messageParameters)
If "messageParameters" exists, format the message using:
String message = MessageFormat.format(messageText, messageParameters);
Report the issue:
reportIssue(message).atLine(line).withGap(cost);
line - line number to associate this violation to. if the line value is < 0, the violation is just associated to the source file.cost - remediation costmessageText - message to logmessageParameters - option message's parameters (see the java.text.MessageFormat class of the java API)@Deprecated public final String getKey()
getKey in interface org.sonar.squid.api.CodeCheck@Deprecated public static Collection<Class> toClassCollection(CobolAstCheck[] checks)
checks - the checks from which we want the collection of classesCopyright © 2009–2018 SonarSource. All rights reserved.