diff options
author | Julien HENRY <henryju@yahoo.fr> | 2017-10-03 14:55:22 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2017-10-04 13:48:58 +0200 |
commit | f6ff49007d98d12b4827f5d6ec07478780933137 (patch) | |
tree | f93d6a6dbc12c12cacca19c5dd03a34cfd21ee44 /sonar-core | |
parent | 489831d3073f67cb838fd607fa90a344125c33f2 (diff) | |
download | sonarqube-f6ff49007d98d12b4827f5d6ec07478780933137.tar.gz sonarqube-f6ff49007d98d12b4827f5d6ec07478780933137.zip |
SONAR-9378 Rename "sonar.lf.sonarqube.com.enabled" setting
Diffstat (limited to 'sonar-core')
4 files changed, 46 insertions, 2 deletions
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 562a5e7cf7a..1836e69ab52 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 @@ -63,6 +63,7 @@ public class CorePropertyDefinitions { defs.addAll(WebhookProperties.all()); defs.addAll(TelemetryProperties.all()); defs.addAll(ScannerProperties.all()); + defs.addAll(WebProperties.all()); defs.addAll(asList( PropertyDefinition.builder(PROP_PASSWORD) diff --git a/sonar-core/src/main/java/org/sonar/core/config/WebConstants.java b/sonar-core/src/main/java/org/sonar/core/config/WebConstants.java index 7e53e1832c7..398eee95a0e 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/WebConstants.java +++ b/sonar-core/src/main/java/org/sonar/core/config/WebConstants.java @@ -30,7 +30,7 @@ public final class WebConstants { public static final String SONAR_LF_LOGO_WIDTH_PX = "sonar.lf.logoWidthPx"; public static final String SONAR_LF_ABOUT_TEXT = "sonar.lf.aboutText"; public static final String SONAR_UPDATECENTER_ACTIVATE = "sonar.updatecenter.activate"; - public static final String SONARQUBE_DOT_COM_ENABLED = "sonar.lf.sonarqube.com.enabled"; + public static final String SONARCLOUD_ENABLED = "sonar.sonarcloud.enabled"; private WebConstants() { } diff --git a/sonar-core/src/main/java/org/sonar/core/config/WebProperties.java b/sonar-core/src/main/java/org/sonar/core/config/WebProperties.java new file mode 100644 index 00000000000..724dbc97aba --- /dev/null +++ b/sonar-core/src/main/java/org/sonar/core/config/WebProperties.java @@ -0,0 +1,43 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.core.config; + +import java.util.List; +import org.sonar.api.PropertyType; +import org.sonar.api.config.PropertyDefinition; + +import static java.util.Arrays.asList; + +public final class WebProperties { + + private WebProperties() { + } + + public static List<PropertyDefinition> all() { + return asList( + PropertyDefinition.builder(WebConstants.SONARCLOUD_ENABLED) + .deprecatedKey("sonar.lf.sonarqube.com.enabled") + .defaultValue("false") + .name("Enable SonarCloud look&feel") + .type(PropertyType.BOOLEAN) + .hidden() + .build()); + } +} 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 c26a8cda61b..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<PropertyDefinition> defs = CorePropertyDefinitions.all(); - assertThat(defs).hasSize(65); + assertThat(defs).hasSize(66); } @Test |