Package org.sonar.api.batch.sensor.issue
Interface NewIssue
-
- All Known Implementing Classes:
DefaultIssue
public interface NewIssueRepresents an issue detected by aSensor.- Since:
- 5.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NewIssueaddFlow(java.lang.Iterable<NewIssueLocation> flowLocations)Register a flow for this issue.NewIssueaddLocation(NewIssueLocation secondaryLocation)Add a secondary location for this issue.NewIssueat(NewIssueLocation primaryLocation)Primary location for this issue.NewIssueforRule(RuleKey ruleKey)TheRuleKeyof the issue.NewIssuegap(java.lang.Double gap)Gap used for the computation of the effort.NewIssueLocationnewLocation()Create a new location for this issue.NewIssueoverrideSeverity(Severity severity)Override severity of the issue.voidsave()Save the issue.
-
-
-
Method Detail
-
gap
NewIssue gap(@Nullable java.lang.Double gap)
Gap used for the computation of the effort.- Since:
- 5.5
-
overrideSeverity
NewIssue overrideSeverity(@Nullable Severity severity)
Override severity of the issue. Setting a null value or not calling this method means to use severity configured in quality profile.
-
at
NewIssue at(NewIssueLocation primaryLocation)
Primary location for this issue.- Since:
- 5.2
-
addLocation
NewIssue addLocation(NewIssueLocation secondaryLocation)
Add a secondary location for this issue. Several secondary locations can be registered.- Since:
- 5.2
-
addFlow
NewIssue addFlow(java.lang.Iterable<NewIssueLocation> flowLocations)
Register a flow for this issue. A flow is an ordered list of issue locations that help to understand the issue. It should be a path that backtracks the issue from its primary location to the start of the flow. Several flows can be registered.- Since:
- 5.2
-
newLocation
NewIssueLocation newLocation()
Create a new location for this issue. First registered location is considered as primary location.- Since:
- 5.2
-
save
void save()
Save the issue. If rule key is unknown or rule not enabled in the current quality profile then a warning is logged but no exception is thrown.
-
-