aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-03-01 08:17:32 -0600
committersonartech <sonartech@sonarsource.com>2019-03-06 11:30:44 +0100
commitf02eeba4ef9908da5d6e5ea969e91a22c6c443cd (patch)
treec2cee4e353bc2ac5fb909378624d592b988c6162 /sonar-scanner-engine
parentb41f2655daa7d58a272f0f98ac1ec16ff10f6e24 (diff)
downloadsonarqube-f02eeba4ef9908da5d6e5ea969e91a22c6c443cd.tar.gz
sonarqube-f02eeba4ef9908da5d6e5ea969e91a22c6c443cd.zip
SONAR-11561 Allow more special characters in branch names
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java
index fb67d7dc0fa..c49d685c9c3 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java
@@ -85,7 +85,7 @@ public class ProjectReactorValidator {
validatePullRequestParamsWhenPluginAbsent(validationMessages);
}
- validateBranch(validationMessages, deprecatedBranchName);
+ validateLegacyBranch(validationMessages, deprecatedBranchName);
if (!validationMessages.isEmpty()) {
throw MessageException.of("Validation of project reactor failed:\n o " + Joiner.on("\n o ").join(validationMessages));
@@ -122,8 +122,8 @@ public class ProjectReactorValidator {
}
}
- private static void validateBranch(List<String> validationMessages, @Nullable String branch) {
- if (isNotEmpty(branch) && !ComponentKeys.isValidBranch(branch)) {
+ private static void validateLegacyBranch(List<String> validationMessages, @Nullable String branch) {
+ if (isNotEmpty(branch) && !ComponentKeys.isValidLegacyBranch(branch)) {
validationMessages.add(format("\"%s\" is not a valid branch name. "
+ "Allowed characters are alphanumeric, '-', '_', '.' and '/'.", branch));
}