Hello community,
I see a warning message in our project in SonarQube (Data Center Editionv9.9.6 (build 92038)):
“Shallow clone detected during the analysis. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to disable shallow clone.”
We checked our GitHub pipeline and see that the action is set according to the documentation. It means:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
We checked the SQ source code and this warning is relevant for the method private boolean cloneIsInvalid(File gitBaseDir) of the class CompositeBlameCommand (link). This warning is logged if the condition if (Files.isRegularFile(gitBaseDir.toPath().resolve(“.git/shallow”))) is fulfilled. We haven’t found any .git/shallow file in the system.
Is there anything else we should consider in order to fulfill condition for full clone of repository?
Thank you
Radek