Skip to content

Commit

Permalink
PLUGINAPI-72 Deprecate metrics 'open_issues', 'reopen_issues' and 'co…
Browse files Browse the repository at this point in the history
…nfirmed_issues' metrics
  • Loading branch information
leo-geoffroy-sonarsource committed Jan 19, 2024
1 parent 3fb805e commit 4376177
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Deprecate `STATUS_OPEN`, `STATUS_CONFIRMED`, `STATUS_REOPENED`, `STATUS_RESOLVED`, `STATUS_CLOSED`,
`RESOLUTION_FIXED`, `RESOLUTION_FALSE_POSITIVE`, `RESOLUTION_REMOVED`, `RESOLUTION_WONT_FIX`, use `org.sonar.api.issue.IssueStatus` enum instead
* Deprecate `RESOLUTION_SAFE`, `RESOLUTION_ACKNOWLEDGED`, `STATUS_TO_REVIEW`, `STATUS_REVIEWED`. No replacement.
* Deprecate `org.sonar.api.measures.CoreMetrics.REOPENED_ISSUES`, `org.sonar.api.measures.CoreMetrics.OPEN_ISSUES`. Use `org.sonar.api.measures.CoreMetrics.VIOLATIONS` instead.
* Deprecate `org.sonar.api.measures.CoreMetrics.CONFIRMED_ISSUES`. No replacement.

## 10.4

Expand Down
12 changes: 12 additions & 0 deletions plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -999,12 +999,16 @@ public final class CoreMetrics {

/**
* @since 3.6
* @deprecated since 10.4. Use {@link #VIOLATIONS_KEY} instead.
*/
@Deprecated(since = "10.4")
public static final String OPEN_ISSUES_KEY = "open_issues";

/**
* @since 3.6
* @deprecated since 10.4. Use {@link #VIOLATIONS} instead.
*/
@Deprecated(since = "10.4")
public static final Metric<Integer> OPEN_ISSUES = new Metric.Builder(OPEN_ISSUES_KEY, "Open Issues", Metric.ValueType.INT)
.setDescription("Open issues")
.setDirection(Metric.DIRECTION_WORST)
Expand All @@ -1015,12 +1019,16 @@ public final class CoreMetrics {

/**
* @since 3.6
* @deprecated since 10.4. Use {@link #VIOLATIONS_KEY} instead.
*/
@Deprecated(since = "10.4")
public static final String REOPENED_ISSUES_KEY = "reopened_issues";

/**
* @since 3.6
* @deprecated since 10.4. Use {@link #VIOLATIONS} instead.
*/
@Deprecated(since = "10.4")
public static final Metric<Integer> REOPENED_ISSUES = new Metric.Builder(REOPENED_ISSUES_KEY, "Reopened Issues", Metric.ValueType.INT)
.setDescription("Reopened issues")
.setDirection(Metric.DIRECTION_WORST)
Expand All @@ -1032,12 +1040,16 @@ public final class CoreMetrics {

/**
* @since 3.6
* @deprecated since 10.4 as status {@link org.sonar.api.issue.Issue#STATUS_CONFIRMED} is deprecated. No replacement.
*/
@Deprecated(since = "10.4")
public static final String CONFIRMED_ISSUES_KEY = "confirmed_issues";

/**
* @since 3.6
* @deprecated since 10.4 as status {@link org.sonar.api.issue.Issue#STATUS_CONFIRMED} is deprecated. No replacement.
*/
@Deprecated(since = "10.4")
public static final Metric<Integer> CONFIRMED_ISSUES = new Metric.Builder(CONFIRMED_ISSUES_KEY, "Confirmed Issues", Metric.ValueType.INT)
.setDescription("Confirmed issues")
.setDirection(Metric.DIRECTION_WORST)
Expand Down

0 comments on commit 4376177

Please sign in to comment.