diff options
author | Janos Gyerik <janos.gyerik@sonarsource.com> | 2017-10-12 14:41:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-12 14:41:19 +0200 |
commit | 01f503279a25c643069968b262492981fb5826ae (patch) | |
tree | a56a92aa074e5b61ac32731927c2afea61ec317a /sonar-scanner-engine/src | |
parent | b084faad25e6f601ac90d993379c799d6500e98f (diff) | |
download | sonarqube-01f503279a25c643069968b262492981fb5826ae.tar.gz sonarqube-01f503279a25c643069968b262492981fb5826ae.zip |
SONAR-9799 deprecate legacy branch param (#2662)
Diffstat (limited to 'sonar-scanner-engine/src')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java | 1 | ||||
-rw-r--r-- | sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java index 053f750158d..720e39e992b 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java @@ -247,6 +247,7 @@ public class ProjectScanContainer extends ComponentContainer { String branch = tree.root().definition().getBranch(); if (branch != null) { LOG.info("Branch key: {}", branch); + LOG.warn("The use of \"sonar.branch\" is deprecated and replaced by \"sonar.branch.name\". See https://redirect.sonarsource.com/doc/branches.html."); } String branchName = props.property(ScannerProperties.BRANCH_NAME); diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java index 9a924c9d8ac..0de22581f63 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java @@ -164,6 +164,7 @@ public class FileSystemMediumTest { assertThat(logs.getAllAsString()).contains("Project key: com.foo.project"); assertThat(logs.getAllAsString()).contains("Branch key: my-branch"); + assertThat(logs.getAllAsString()).contains("The use of \"sonar.branch\" is deprecated and replaced by \"sonar.branch.name\"."); } @Test |