Class ExternalIssueRepository
java.lang.Object
org.sonar.plugins.javascript.external.ExternalIssueRepository
This is the application of the Repository Pattern.
In a proper Domain-Driven project, the repository implementation is hosted by the Infrastructure layer,
and its purpose is to serve as a delegate between the Domain and the persistence layer.
We can fit this class into the pattern, using the following rationalizations:
* The `Issue` instance is the Domain entity - i.e. the Conceptual entity of the Conceptual Data Model
* The `SensorContext` instance is the persistence layer - i.e. SonarQube is the infrastructure Host, which provides the persistence layer through the `NewExternalIssue` class
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
dedupeAndSaveESLintIssues
(org.sonar.api.batch.sensor.SensorContext context, Map<String, List<ExternalIssue>> externalIssuesMap, List<BridgeServer.Issue> issues) static List<ExternalIssue>
deduplicateIssues
(List<ExternalIssue> externalIssues, List<BridgeServer.Issue> issues) static void
save
(ExternalIssue issue, org.sonar.api.batch.sensor.SensorContext context) Persist the passed issue into the passed context, using the passed rule repository key to resolve the belonging rule.static void
saveESLintIssues
(org.sonar.api.batch.sensor.SensorContext context, List<ExternalIssue> externalIssues)
-
Method Details
-
save
Persist the passed issue into the passed context, using the passed rule repository key to resolve the belonging rule. -
dedupeAndSaveESLintIssues
public static void dedupeAndSaveESLintIssues(org.sonar.api.batch.sensor.SensorContext context, Map<String, List<ExternalIssue>> externalIssuesMap, List<BridgeServer.Issue> issues) -
saveESLintIssues
public static void saveESLintIssues(org.sonar.api.batch.sensor.SensorContext context, List<ExternalIssue> externalIssues) -
deduplicateIssues
public static List<ExternalIssue> deduplicateIssues(@Nullable List<ExternalIssue> externalIssues, List<BridgeServer.Issue> issues)
-