aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorlukasz-jarocki-sonarsource <77498856+lukasz-jarocki-sonarsource@users.noreply.github.com>2021-02-17 16:22:59 +0100
committersonartech <sonartech@sonarsource.com>2021-02-19 20:07:20 +0000
commit9497e4d9cd1cf62d9f694864e7bc3748f61cb361 (patch)
treefe7c69a622823809ad0b1245e400de41b8642e23 /sonar-plugin-api
parent69481df48a3854bfc1538980b9c74d6810457da4 (diff)
downloadsonarqube-9497e4d9cd1cf62d9f694864e7bc3748f61cb361.tar.gz
sonarqube-9497e4d9cd1cf62d9f694864e7bc3748f61cb361.zip
SONAR-14461 main branch detection
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java
index 6dfbe796073..b208a2359d4 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java
@@ -68,6 +68,17 @@ public abstract class ScmProvider {
}
/**
+ * Return the main branch name.
+ *
+ * @return null if the SCM provider was not able to find the main branch.
+ * @since 8.8
+ */
+ @CheckForNull
+ public String getMainBranch(Path rootBaseDir) {
+ return null;
+ }
+
+ /**
* Return a map between paths given as argument and the corresponding line numbers which are new compared to the provided target branch.
* If nothing is returned for a file, the scanner will consider that the provider was unable to determine changes for that file and it will
* assume that nothing was changed in it.