diff options
author | Michal Duda <michal.duda@sonarsource.com> | 2019-02-01 12:51:32 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-02-18 20:20:55 +0100 |
commit | 2b8cc73a602be586c15754f7d87242dbaa5ccfd7 (patch) | |
tree | 9e0a974b045fa96f97fed0ea2620ddccf4545743 /sonar-core | |
parent | e89a888d560520c69f01e45fc5c9649e76fba30d (diff) | |
download | sonarqube-2b8cc73a602be586c15754f7d87242dbaa5ccfd7.tar.gz sonarqube-2b8cc73a602be586c15754f7d87242dbaa5ccfd7.zip |
SONARCLOUD-336: Automatically guess the projectKey/organization
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java | 7 | ||||
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java | 2 |
2 files changed, 8 insertions, 1 deletions
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 c34d1792b5b..cb67a39fb17 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 @@ -41,6 +41,7 @@ public class ScannerProperties { public static final String PULL_REQUEST_BASE = "sonar.pullrequest.base"; public static final String LINKS_SOURCES_DEV = "sonar.links.scm_dev"; + public static final String DISABLE_PROJECT_AND_ORG_AUTODETECTION = "sonar.keys_autodetection.disabled"; private ScannerProperties() { // only static stuff @@ -90,6 +91,12 @@ public class ScannerProperties { "Defines the target branch of the pull request being analyzed. " + "If no target is defined, the main branch is used as the target.") .hidden() + .build(), + PropertyDefinition.builder(DISABLE_PROJECT_AND_ORG_AUTODETECTION) + .name("Disables project and organization auto-detection") + .description("Disables auto-detection of project and organization keys from scanner execution environment.") + .type(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 9649863b8b9..54c4a7aac16 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 @@ -30,7 +30,7 @@ public class CorePropertyDefinitionsTest { @Test public void all() { List<PropertyDefinition> defs = CorePropertyDefinitions.all(); - assertThat(defs).hasSize(53); + assertThat(defs).hasSize(54); } @Test |