Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONAR-9720 Issue tracking for long branches
- Loading branch information
Showing
21 changed files
with
419 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
.../org/sonar/server/computation/task/projectanalysis/issue/MergeBranchTrackerExecution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,42 @@ | |||
/* | |||
* SonarQube | |||
* Copyright (C) 2009-2017 SonarSource SA | |||
* mailto:info AT sonarsource DOT com | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public License | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.computation.task.projectanalysis.issue; | |||
|
|||
import org.sonar.core.issue.DefaultIssue; | |||
import org.sonar.core.issue.tracking.Tracker; | |||
import org.sonar.core.issue.tracking.Tracking; | |||
import org.sonar.server.computation.task.projectanalysis.component.Component; | |||
|
|||
public class MergeBranchTrackerExecution { | |||
private final TrackerRawInputFactory rawInputFactory; | |||
private final TrackerMergeBranchInputFactory mergeInputFactory; | |||
private final Tracker<DefaultIssue, DefaultIssue> tracker; | |||
|
|||
public MergeBranchTrackerExecution(TrackerRawInputFactory rawInputFactory, TrackerMergeBranchInputFactory mergeInputFactory, | |||
Tracker<DefaultIssue, DefaultIssue> tracker) { | |||
this.rawInputFactory = rawInputFactory; | |||
this.mergeInputFactory = mergeInputFactory; | |||
this.tracker = tracker; | |||
} | |||
|
|||
public Tracking<DefaultIssue, DefaultIssue> track(Component component) { | |||
return tracker.track(rawInputFactory.create(component), mergeInputFactory.create(component)); | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...src/main/java/org/sonar/server/computation/task/projectanalysis/issue/TrackingResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,55 @@ | |||
/* | |||
* SonarQube | |||
* Copyright (C) 2009-2017 SonarSource SA | |||
* mailto:info AT sonarsource DOT com | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public License | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.computation.task.projectanalysis.issue; | |||
|
|||
import java.util.Map; | |||
|
|||
import org.sonar.core.issue.DefaultIssue; | |||
|
|||
public class TrackingResult { | |||
private final Map<DefaultIssue, DefaultIssue> issuesToCopy; | |||
private final Map<DefaultIssue, DefaultIssue> issuesToMerge; | |||
private final Iterable<DefaultIssue> issuesToClose; | |||
private final Iterable<DefaultIssue> newIssues; | |||
|
|||
public TrackingResult(Map<DefaultIssue, DefaultIssue> issuesToCopy, Map<DefaultIssue, DefaultIssue> issuesToMerge, | |||
Iterable<DefaultIssue> issuesToClose, Iterable<DefaultIssue> newIssues) { | |||
this.issuesToCopy = issuesToCopy; | |||
this.issuesToMerge = issuesToMerge; | |||
this.issuesToClose = issuesToClose; | |||
this.newIssues = newIssues; | |||
} | |||
|
|||
public Map<DefaultIssue, DefaultIssue> issuesToCopy() { | |||
return issuesToCopy; | |||
} | |||
|
|||
public Map<DefaultIssue, DefaultIssue> issuesToMerge() { | |||
return issuesToMerge; | |||
} | |||
|
|||
public Iterable<DefaultIssue> issuesToClose() { | |||
return issuesToClose; | |||
} | |||
|
|||
public Iterable<DefaultIssue> newIssues() { | |||
return newIssues; | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.