Package org.sonar.api.batch.sensor.issue
Interface NewExternalIssue
-
- All Known Implementing Classes:
DefaultExternalIssue
public interface NewExternalIssueBuilder for an issue imported from an external rule engine by aSensor. Don't forget tosave()after setting the fields.- Since:
- 7.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description NewExternalIssueaddFlow(java.lang.Iterable<NewIssueLocation> flowLocations)Register a flow for this issue.NewExternalIssueaddLocation(NewIssueLocation secondaryLocation)Add a secondary location for this issue.NewExternalIssueat(NewIssueLocation primaryLocation)Primary location for this issue.NewExternalIssueengineId(java.lang.String engineId)Unique identifier of the external analyzer (e.g.NewExternalIssueforRule(RuleKey ruleKey)Deprecated.since 7.4.NewIssueLocationnewLocation()Create a new location for this issue.NewExternalIssueremediationEffortMinutes(java.lang.Long effortInMinutes)Effort to fix the issue, in minutes.NewExternalIssueruleId(java.lang.String ruleId)Unique rule identifier for a givenengineId(String)voidsave()Save the issue.NewExternalIssueseverity(Severity severity)Set the severity of the issue.NewExternalIssuetype(RuleType type)Type of issue.
-
-
-
Method Detail
-
forRule
@Deprecated NewExternalIssue forRule(RuleKey ruleKey)
Deprecated.since 7.4. It is misleading, because of the "external_" prefix that is added on server side. UseengineId(String)andruleId(String)TheRuleKeyof the issue.
-
engineId
NewExternalIssue engineId(java.lang.String engineId)
Unique identifier of the external analyzer (e.g. eslint, pmd, ...)- Since:
- 7.4
-
ruleId
NewExternalIssue ruleId(java.lang.String ruleId)
Unique rule identifier for a givenengineId(String)- Since:
- 7.4
-
type
NewExternalIssue type(RuleType type)
Type of issue.
-
remediationEffortMinutes
NewExternalIssue remediationEffortMinutes(@Nullable java.lang.Long effortInMinutes)
Effort to fix the issue, in minutes.
-
severity
NewExternalIssue severity(Severity severity)
Set the severity of the issue.
-
at
NewExternalIssue at(NewIssueLocation primaryLocation)
Primary location for this issue.
-
addLocation
NewExternalIssue addLocation(NewIssueLocation secondaryLocation)
Add a secondary location for this issue. Several secondary locations can be registered.
-
addFlow
NewExternalIssue 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.
-
newLocation
NewIssueLocation newLocation()
Create a new location for this issue. First registered location is considered as primary location.
-
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.
-
-