@ScannerSide @ExtensionPoint public abstract class ScmProvider extends java.lang.Object
Constructor and Description |
---|
ScmProvider() |
Modifier and Type | Method and Description |
---|---|
BlameCommand |
blameCommand() |
java.util.Set<java.nio.file.Path> |
branchChangedFiles(java.lang.String targetBranchName,
java.nio.file.Path rootBaseDir)
Return absolute path of the files changed in the current branch, compared to the provided target branch.
|
java.util.Map<java.nio.file.Path,java.util.Set<java.lang.Integer>> |
branchChangedLines(java.lang.String targetBranchName,
java.nio.file.Path rootBaseDir,
java.util.Set<java.nio.file.Path> files)
Return a map between paths given as argument and the corresponding line numbers which are new compared to the provided target branch.
|
IgnoreCommand |
ignoreCommand() |
abstract java.lang.String |
key()
Unique identifier of the provider.
|
java.nio.file.Path |
relativePathFromScmRoot(java.nio.file.Path path)
The relative path from SCM root
|
java.lang.String |
revisionId(java.nio.file.Path path)
The current revision id of the analyzed code,
for example the SHA1 of the current HEAD in a Git branch.
|
boolean |
supports(java.io.File baseDir)
Whether this provider is able to manage files located in this directory.
|
public abstract java.lang.String key()
CoreProperties.SCM_PROVIDER_KEY
Can be used in SCM URL to define the provider to use.public boolean supports(java.io.File baseDir)
public BlameCommand blameCommand()
@CheckForNull public java.util.Set<java.nio.file.Path> branchChangedFiles(java.lang.String targetBranchName, java.nio.file.Path rootBaseDir)
@CheckForNull public java.util.Map<java.nio.file.Path,java.util.Set<java.lang.Integer>> branchChangedLines(java.lang.String targetBranchName, java.nio.file.Path rootBaseDir, java.util.Set<java.nio.file.Path> files)
files
- Absolute path of files of interestpublic java.nio.file.Path relativePathFromScmRoot(java.nio.file.Path path)
public IgnoreCommand ignoreCommand()
public java.lang.String revisionId(java.nio.file.Path path)