Package org.sonar.api.batch.sensor.issue
Interface NewIssue
-
public interface NewIssue
Represents an issue detected by aSensor
.- Since:
- 5.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NewIssue
addFlow(java.lang.Iterable<NewIssueLocation> flowLocations)
Register a flow for this issue.NewIssue
addLocation(NewIssueLocation secondaryLocation)
Add a secondary location for this issue.NewIssue
at(NewIssueLocation primaryLocation)
Primary location for this issue.NewIssue
forRule(RuleKey ruleKey)
TheRuleKey
of the issue.NewIssue
gap(java.lang.Double gap)
Gap used for the computation of the effort.NewIssueLocation
newLocation()
Create a new location for this issue.NewIssue
overrideSeverity(Severity severity)
Override severity of the issue.void
save()
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.
-
-