From c1ea1e9df27db899c07948ce50e6aa9cceab348a Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Mon, 28 Mar 2022 16:03:35 +0200 Subject: [PATCH] SONAR-16188 Deactivate common rules for SonarText --- .../java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java | 2 +- .../org/sonar/server/rule/CommonRuleDefinitionsImplTest.java | 3 ++- 2 files changed, 3 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 54bc2740cfe..3716a0498f1 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 @@ -40,7 +40,7 @@ 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 LANGUAGES_TO_SKIP = List.of("terraform", "cloudformation", "web", "css", "xml", "yaml", "json", "jsp"); + private static final List LANGUAGES_TO_SKIP = List.of("terraform", "cloudformation", "web", "css", "xml", "yaml", "json", "jsp", "text"); 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 51260b59759..ab18b18f4c5 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 @@ -62,7 +62,8 @@ public class CommonRuleDefinitionsImplTest { createLanguage("xml"), createLanguage("yaml"), createLanguage("json"), - createLanguage("jsp") + createLanguage("jsp"), + createLanguage("text") ); } -- 2.39.5