public abstract class IssuableSubscriptionVisitor extends SubscriptionVisitor
context
Constructor and Description |
---|
IssuableSubscriptionVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
addIssue(int line,
String message)
Report an issue on a specific line.
|
void |
addIssueOnFile(String message)
Report an issue at file level.
|
void |
reportIssue(Tree tree,
String message)
Report an issue.
|
void |
reportIssue(Tree tree,
String message,
List<JavaFileScannerContext.Location> flow,
Integer cost)
Report an issue.
|
void |
reportIssue(Tree startTree,
Tree endTree,
String message)
Report an issue.
|
hasSemantic, leaveNode, nodesToVisit, scanFile, scanTree, visitNode, visitToken, visitTrivia
public void addIssue(int line, String message)
line
- line on which to report the issuemessage
- Message to display to the userpublic void addIssueOnFile(String message)
message
- Message to display to the userpublic void reportIssue(Tree tree, String message)
tree
- syntax node on which to raise the issue.message
- Message to display to the user.public void reportIssue(Tree tree, String message, List<JavaFileScannerContext.Location> flow, @Nullable Integer cost)
tree
- syntax node on which to raise the issue.message
- Message to display to the user.flow
- List of JavaFileScannerContext.Location
to display secondary locations describing the flow leading to the issue.
Empty list if the issue does not requires secondary location.cost
- computed remediation cost if applicable, null if not.Copyright © 2012–2016 SonarSource. All rights reserved.