diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2022-09-20 11:59:16 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-10-12 20:03:43 +0000 |
commit | 566094fc629ab1e92afb0cdf191a0e2c685b5c35 (patch) | |
tree | ce172266109cf1c4e81a041e460c6cc7bcd5d50e /sonar-scanner-engine/src/main/java | |
parent | bcfb1cac55137b838da7a93385b20e0e5ed47abb (diff) | |
download | sonarqube-566094fc629ab1e92afb0cdf191a0e2c685b5c35.tar.gz sonarqube-566094fc629ab1e92afb0cdf191a0e2c685b5c35.zip |
SONAR-17352 Refactor component keys to not include branch suffix
Diffstat (limited to 'sonar-scanner-engine/src/main/java')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorValidator.java | 7 |
1 files changed, 0 insertions, 7 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 303391ee406..6b4f05f9d25 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 @@ -20,9 +20,7 @@ package org.sonar.scanner.scan; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import java.util.Set; import java.util.stream.Stream; import javax.annotation.Nullable; import org.sonar.api.batch.bootstrap.ProjectDefinition; @@ -104,11 +102,6 @@ public class ProjectReactorValidator { if (!ComponentKeys.isValidProjectKey(projectDefinition.getKey())) { validationMessages.add(format("\"%s\" is not a valid project key. %s.", projectDefinition.getKey(), ALLOWED_CHARACTERS_MESSAGE)); } - Set<String> forbiddenNamePhrases = Set.of(":BRANCH:", ":PULLREQUEST:"); - if (forbiddenNamePhrases.stream().anyMatch(projectDefinition.getKey()::contains)) { - validationMessages.add(format("\"%s\" is not a valid project key. Project key must not contain following phrases [%s]", projectDefinition.getKey(), - String.join(", ", forbiddenNamePhrases))); - } } private boolean isBranchFeatureAvailable() { |