@@ -96,7 +96,10 @@ public class ComponentAction implements MeasuresWsAction { | |||
.setResponseExample(getClass().getResource("component-example.json")) | |||
.setSince("5.4") | |||
.setChangelog( | |||
new Change("10.4", String.format("The metrics %s are now deprecated in the response " + | |||
new Change("10.5", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube105())), | |||
new Change("10.4", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube104())), | |||
new Change("10.4", "Added new accepted values for the 'metricKeys' param: 'maintainability_issues', 'reliability_issues', 'security_issues'"), |
@@ -184,8 +184,11 @@ public class ComponentTreeAction implements MeasuresWsAction { | |||
.setHandler(this) | |||
.addPagingParams(100, MAX_SIZE) | |||
.setChangelog( | |||
new Change("10.5", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube105())), | |||
new Change("10.5", "Added new accepted values for the 'metricKeys' param: 'maintainability_issues', 'reliability_issues', 'security_issues'"), | |||
new Change("10.4", String.format("The metrics %s are now deprecated in the response " + | |||
new Change("10.4", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube104())), | |||
new Change("10.4", "The metrics 'open_issues', 'reopened_issues' and 'confirmed_issues' are now deprecated in the response. Consume 'violations' instead."), |
@@ -43,4 +43,9 @@ public class MeasuresWsModule extends Module { | |||
return "'" + String.join("', '","bugs", "new_bugs", "vulnerabilities", "new_vulnerabilities", | |||
"code_smells", "new_code_smells", "high_impact_accepted_issues") + "'"; | |||
} | |||
public static String getDeprecatedMetricsInSonarQube105() { | |||
return "'" + String.join("', '", "new_blocker_violations", "new_critical_violations", "new_major_violations", "new_minor_violations", | |||
"new_info_violations", "blocker_violations", "critical_violations", "major_violations", "minor_violations", "info_violations") + "'"; | |||
} | |||
} |
@@ -87,7 +87,10 @@ public class SearchAction implements MeasuresWsAction { | |||
.setResponseExample(getClass().getResource("search-example.json")) | |||
.setHandler(this) | |||
.setChangelog( | |||
new Change("10.4", String.format("The metrics %s are now deprecated in the response " + | |||
new Change("10.5", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube105())), | |||
new Change("10.4", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube104())), | |||
new Change("10.4", "Added new accepted values for the 'metricKeys' param: 'maintainability_issues', 'reliability_issues', 'security_issues'"), |
@@ -95,7 +95,10 @@ public class SearchHistoryAction implements MeasuresWsAction { | |||
.setResponseExample(getClass().getResource("search_history-example.json")) | |||
.setSince("6.3") | |||
.setChangelog( | |||
new Change("10.4", String.format("The metrics %s are now deprecated in the response " + | |||
new Change("10.5", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube105())), | |||
new Change("10.4", String.format("The metrics %s are now deprecated " + | |||
"without exact replacement. Use 'maintainability_issues', 'reliability_issues' and 'security_issues' instead.", | |||
MeasuresWsModule.getDeprecatedMetricsInSonarQube104())), | |||
new Change("10.4", "The metrics 'open_issues', 'reopened_issues' and 'confirmed_issues' are now deprecated in the response. Consume 'violations' instead."), |
@@ -39,4 +39,12 @@ public class MeasuresWsModuleTest { | |||
assertThat(actual).isEqualTo("'bugs', 'new_bugs', 'vulnerabilities', 'new_vulnerabilities', 'code_smells', 'new_code_smells', " + | |||
"'high_impact_accepted_issues'"); | |||
} | |||
@Test | |||
public void getDeprecatedMetricsInSonarQube105_shouldReturnExactString() { | |||
String actual = MeasuresWsModule.getDeprecatedMetricsInSonarQube105(); | |||
assertThat(actual).isEqualTo("'new_blocker_violations', 'new_critical_violations', 'new_major_violations', 'new_minor_violations', " + | |||
"'new_info_violations', 'blocker_violations', 'critical_violations', 'major_violations', 'minor_violations', 'info_violations'"); | |||
} | |||
} |