aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDejan Milisavljevic <dejan.milisavljevic@sonarsource.com>2024-10-23 09:39:32 +0200
committersonartech <sonartech@sonarsource.com>2024-10-23 20:02:47 +0000
commit4f5c724f65ee8c9248504a82ea88bbcaa1e0eb09 (patch)
tree86e965e4771a8342f4f57faf584dba9d37278196
parent22abf56628d035d8c16ea587ef0570cf2f1b8ea5 (diff)
downloadsonarqube-4f5c724f65ee8c9248504a82ea88bbcaa1e0eb09.tar.gz
sonarqube-4f5c724f65ee8c9248504a82ea88bbcaa1e0eb09.zip
SONAR-23425 Scanning alerts work in both MQR and STANDARD modes
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/MQRModeConstants.java1
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/MQRModeProperties.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/config/MQRModeConstants.java b/sonar-core/src/main/java/org/sonar/core/config/MQRModeConstants.java
index 3a89d92b523..a1653eab580 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/MQRModeConstants.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/MQRModeConstants.java
@@ -24,6 +24,7 @@ public class MQRModeConstants {
public static final String UI_MODE = "Mode";
public static final String UI_MODE_SUB_CATEGORY = "Mode";
public static final String MULTI_QUALITY_MODE_ENABLED = "sonar.multi-quality-mode.enabled";
+ public static final boolean MULTI_QUALITY_MODE_DEFAULT_VALUE = true;
private MQRModeConstants() {
//class cannot be instantiated
diff --git a/sonar-core/src/main/java/org/sonar/core/config/MQRModeProperties.java b/sonar-core/src/main/java/org/sonar/core/config/MQRModeProperties.java
index 5b7cfd12372..b5ef02e42e9 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/MQRModeProperties.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/MQRModeProperties.java
@@ -24,6 +24,7 @@ import java.util.List;
import org.sonar.api.PropertyType;
import org.sonar.api.config.PropertyDefinition;
+import static org.sonar.core.config.MQRModeConstants.MULTI_QUALITY_MODE_DEFAULT_VALUE;
import static org.sonar.core.config.MQRModeConstants.UI_MODE;
import static org.sonar.core.config.MQRModeConstants.UI_MODE_SUB_CATEGORY;
import static org.sonar.core.config.MQRModeConstants.MULTI_QUALITY_MODE_ENABLED;
@@ -36,7 +37,7 @@ public final class MQRModeProperties {
public static List<PropertyDefinition> all() {
return Collections.singletonList(
PropertyDefinition.builder(MULTI_QUALITY_MODE_ENABLED)
- .defaultValue(Boolean.TRUE.toString())
+ .defaultValue(Boolean.toString(MULTI_QUALITY_MODE_DEFAULT_VALUE))
.name("Enable Multi-Quality Rule Mode")
.description("Aims to more accurately represent the impact software has on all software qualities. " +
"It does this by mapping rules to every software quality they can impact, not just the one " +