Zip install of SonarQube CE 9.9.0.65466 on to Windows Server
Analysis execution from KDE Neon (Ubuntu base) using Java 17 and Maven
I am trying to run analysis from my main project folder that does have a .git folder present.
If I do not supply -Dsonar.scm.provider=git, I always get this warning: SCM provider autodetection failed. Both git and svn claim to support this project. Please use "sonar.scm.provider" to define SCM of your project.
After reading many similar reports, I can only conclude that .git is not being sent to the server or is being ignored for some reason; I been unable to find any documentation on how to ensure .git is included/respected.
Can someone please point me in the correct direction?
There’s not really much additional useful logging available on this topic.
It’s clear that the scanner can find the .git folder, otherwise the error message wouldn’t indicate that git has “claimed” to support the project.
I wonder if there’s an .svn folder erroneously sitting around in the directories above your project directory. Can you try a few cd ..; ls -a commands?
Let’s get through the git/svn dual claiming issue first. A lack of blame information can come from a few places:
.svn exists in some sibling locations, but not in the path to this specific project. As a test I copied the project over to /tmp and tried again. No issue this time. So, somehow, the plugin must be picking up on those .svn folders. Or there is an errant one floating around I have not found yet.
I have renamed all the .svn I can find and the plugin still reports the error in the original location. I just wish it would tell me where it’s finding the file. I can alway grab source and put in my own logging I guess.
Edit: I now have this project as a sibling with another, both under my home folder. The other works without error, but the current project (and many others, but not all) still fail.
Looking at the code (which I now realise is server-side), the only explanation is a some errant .svn but I simply cannot find any.
Thanks. And just to confirm, this was in the base of your project? Or it was in the very root directory of your entire filesystem? Just trying to judge where the issue was and if something could be improved in the detection logic (if not a little more logging to flag which .svn folder is being picked up)
Also don’t hesitate to let us know if you still need help on this point:
The blame information seems to now just restrictred to the pom.xml, it’s not something I am overly concerned about just now and I can revisit that in the future if it remains an issue.