From a5e983797e23c5ff158483653415da05394d2bef Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Mon, 5 Jun 2017 11:50:51 +0200 Subject: [PATCH] SONAR-9356 define property "sonar.onboardingTutorial.skip" --- .../ce/container/ComputeEngineContainerImplTest.java | 2 +- .../org/sonar/core/config/CorePropertyDefinitions.java | 8 ++++++++ .../sonar/core/config/CorePropertyDefinitionsTest.java | 2 +- .../src/main/java/org/sonar/api/CoreProperties.java | 4 ++++ 4 files changed, 14 insertions(+), 2 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 c55c3f30417..542d916364e 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 @@ -137,7 +137,7 @@ public class ComputeEngineContainerImplTest { + 23 // level 1 + 46 // content of DaoModule + 3 // content of EsSearchModule - + 56 // content of CorePropertyDefinitions + + 57 // content of CorePropertyDefinitions ); assertThat( picoContainer.getComponentAdapters().stream() 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 19c7a49bc12..ec0402616c7 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 @@ -120,6 +120,14 @@ public class CorePropertyDefinitions { .multiValues(true) .defaultValue(CoreProperties.PREVIEW_EXCLUDE_PLUGINS_DEFAULT_VALUE) .build(), + PropertyDefinition.builder(CoreProperties.SKIP_ONBOARDING_TUTORIAL) + .name("Skip the onboarding tutorial") + .type(PropertyType.BOOLEAN) + .description("By default, each new user is lead through a tutorial, that explains how to analyze a first project, after logging in for the fist time. " + + "By enabling this setting, the tutorial will not be shown automatically, but only be visible in the help.") + .category(CoreProperties.CATEGORY_GENERAL) + .defaultValue(String.valueOf(false)) + .build(), PropertyDefinition.builder(CoreProperties.CORE_AUTHENTICATOR_REALM) .name("Security Realm") .hidden() 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 6706eda9399..0d1e7f05b9f 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(56); + assertThat(defs).hasSize(57); } @Test diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java index 1ab9759bb88..869022a2758 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java @@ -493,4 +493,8 @@ public interface CoreProperties { */ String DEFAULT_ISSUE_ASSIGNEE = "sonar.issues.defaultAssigneeLogin"; + /** + * @since 6.5 + */ + String SKIP_ONBOARDING_TUTORIAL = "sonar.onboardingTutorial.skip"; } -- 2.39.5