aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-core
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2023-01-10 09:07:17 +0100
committersonartech <sonartech@sonarsource.com>2023-01-11 20:02:58 +0000
commita3d6bc104535265ab04a7683b22388ec6e1b3e1d (patch)
treedbbf39bdfbb12d6d0abbfb560957589dcdb5008f /server/sonar-webserver-core
parent62aa88fb031d402d2eacb58bd36f952f6707b8bc (diff)
downloadsonarqube-a3d6bc104535265ab04a7683b22388ec6e1b3e1d.tar.gz
sonarqube-a3d6bc104535265ab04a7683b22388ec6e1b3e1d.zip
SONAR-17836 Deactivate common rules for the "Secrets" language
Diffstat (limited to 'server/sonar-webserver-core')
-rw-r--r--server/sonar-webserver-core/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java14
-rw-r--r--server/sonar-webserver-core/src/test/java/org/sonar/server/rule/CommonRuleDefinitionsImplTest.java3
2 files changed, 15 insertions, 2 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java
index f2807079b77..708dcf15109 100644
--- a/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java
+++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java
@@ -39,7 +39,19 @@ import static org.sonar.server.rule.CommonRuleKeys.commonRepositoryForLang;
// It replaces the common-rules that are still embedded within plugins.
public class CommonRuleDefinitionsImpl implements CommonRuleDefinitions {
- private static final List<String> LANGUAGES_TO_SKIP = List.of("terraform", "cloudformation", "kubernetes", "docker", "web", "css", "xml", "yaml", "json", "jsp", "text");
+ private static final List<String> LANGUAGES_TO_SKIP = List.of(
+ "terraform",
+ "cloudformation",
+ "kubernetes",
+ "docker",
+ "web",
+ "css",
+ "xml",
+ "yaml",
+ "json",
+ "jsp",
+ "text",
+ "secrets");
private static final String MINUTES_10 = "10min";
private final Languages languages;
diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/CommonRuleDefinitionsImplTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/CommonRuleDefinitionsImplTest.java
index acdf03aeff3..5e2f77560f2 100644
--- a/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/CommonRuleDefinitionsImplTest.java
+++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/rule/CommonRuleDefinitionsImplTest.java
@@ -65,7 +65,8 @@ public class CommonRuleDefinitionsImplTest {
createLanguage("yaml"),
createLanguage("json"),
createLanguage("jsp"),
- createLanguage("text")
+ createLanguage("text"),
+ createLanguage("secrets")
);
}