Skip to content

Commit

Permalink
PLUGINAPI-103 Revert addition of impacts on ActiveRules
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed Oct 18, 2024
1 parent d950dfa commit 3a77da9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 58 deletions.
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Changelog

## 10.12
* Introduce impacts on `org.sonar.api.batch.rule.ActiveRule`

## 10.11
* Introduce new impact severities `org.sonar.api.issue.impact.Severity.INFO` and `org.sonar.api.issue.impact.Severity.BLOCKER`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@
import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.concurrent.Immutable;

import org.sonar.api.issue.impact.Severity;
import org.sonar.api.issue.impact.SoftwareQuality;
import org.sonar.api.rule.RuleKey;

/**
* Configuration of a rule activated on a Quality profile
*
* @since 4.2
*/
@Immutable
Expand All @@ -38,15 +36,11 @@ public interface ActiveRule {

/**
* Non-null severity.
*
* @see org.sonar.api.rule.Severity
*/
String severity();

/**
* Overridden impact severities from the rule.
*/
Map<SoftwareQuality, Severity> impacts();

/**
* Language of rule, for example <code>java</code>
*/
Expand Down Expand Up @@ -74,13 +68,15 @@ public interface ActiveRule {

/**
* Optional rule key of the template rule.
*
* @since 4.5.3
*/
@CheckForNull
String templateRuleKey();

/**
* Key of the quality profile the rule belongs to.
*
* @since 7.5
*/
String qpKey();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
import org.sonar.api.issue.impact.SoftwareQuality;
import org.sonar.api.rule.RuleKey;

/**
* @deprecated since 10.13. Internal implementation
*/
@Deprecated(since = "10.13", forRemoval = true)
public class LoadedActiveRule {
private RuleKey ruleKey;
private String severity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.slf4j.event.Level;
import org.sonar.api.issue.impact.Severity;
import org.sonar.api.issue.impact.SoftwareQuality;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.testfixtures.log.LogTesterJUnit5;

Expand Down Expand Up @@ -152,11 +150,6 @@ public String severity() {
return null;
}

@Override
public Map<SoftwareQuality, Severity> impacts() {
return Map.of();
}

@Override
public String language() {
return null;
Expand Down

This file was deleted.

0 comments on commit 3a77da9

Please sign in to comment.