From 7baa39968b61a61b5d73640bbe0eac26a686d85b Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Fri, 20 Oct 2017 11:51:00 +0200 Subject: [PATCH] SONAR-9770 Deprecate preview properties --- .../ce/container/ComputeEngineContainerImplTest.java | 2 +- .../org/sonar/core/config/CorePropertyDefinitions.java | 4 ++-- .../java/org/sonar/core/config/ScannerProperties.java | 9 --------- .../sonar/core/config/CorePropertyDefinitionsTest.java | 2 +- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java index e70437c795b..9f02e6aa47c 100644 --- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java +++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java @@ -114,7 +114,7 @@ public class ComputeEngineContainerImplTest { + 26 // level 1 + 52 // content of DaoModule + 3 // content of EsSearchModule - + 67 // content of CorePropertyDefinitions + + 66 // content of CorePropertyDefinitions + 1 // StopFlagContainer ); assertThat( diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index b9746f5ed2d..817759783fb 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -105,14 +105,14 @@ public class CorePropertyDefinitions { .build(), PropertyDefinition.builder(CoreProperties.PREVIEW_INCLUDE_PLUGINS) .name("Plugins accepted for Preview mode") - .description("List of plugin keys. Those plugins will be used during preview analyses.") + .description("DEPRECATED - List of plugin keys. Those plugins will be used during preview analyses.") .category(CoreProperties.CATEGORY_GENERAL) .multiValues(true) .defaultValue(CoreProperties.PREVIEW_INCLUDE_PLUGINS_DEFAULT_VALUE) .build(), PropertyDefinition.builder(CoreProperties.PREVIEW_EXCLUDE_PLUGINS) .name("Plugins excluded for Preview mode") - .description("List of plugin keys. Those plugins will not be used during preview analyses.") + .description("DEPRECATED - List of plugin keys. Those plugins will not be used during preview analyses.") .category(CoreProperties.CATEGORY_GENERAL) .multiValues(true) .defaultValue(CoreProperties.PREVIEW_EXCLUDE_PLUGINS_DEFAULT_VALUE) diff --git a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java index 6c91f2f6614..4f234e0e3aa 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java +++ b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java @@ -21,7 +21,6 @@ package org.sonar.core.config; import java.util.List; import org.sonar.api.CoreProperties; -import org.sonar.api.PropertyType; import org.sonar.api.config.PropertyDefinition; import org.sonar.api.resources.Qualifiers; @@ -42,14 +41,6 @@ public class ScannerProperties { public static List all() { return asList( - PropertyDefinition.builder(CoreProperties.ANALYSIS_MODE) - .name("Analysis mode") - .type(PropertyType.SINGLE_SELECT_LIST) - .options(asList(CoreProperties.ANALYSIS_MODE_ANALYSIS, CoreProperties.ANALYSIS_MODE_PREVIEW, CoreProperties.ANALYSIS_MODE_INCREMENTAL)) - .category(CoreProperties.CATEGORY_GENERAL) - .defaultValue(CoreProperties.ANALYSIS_MODE_ANALYSIS) - .hidden() - .build(), PropertyDefinition.builder(CoreProperties.SCM_DISABLED_KEY) .name("Disable the SCM Sensor") .description("Disable the retrieval of blame information from Source Control Manager") diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java index 4144587b4be..aa7bcd07d0d 100644 --- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java @@ -33,7 +33,7 @@ public class CorePropertyDefinitionsTest { @Test public void all() { List defs = CorePropertyDefinitions.all(); - assertThat(defs).hasSize(67); + assertThat(defs).hasSize(66); } @Test -- 2.39.5