I have a Java/Maven/Bitbucket/SonarCloud setup. This includes Git Submodules inside the main checkout. Until a few days ago I was getting full details in SonarCloud for all the Maven modules in both the main Git checkout and the Submodules but the Submodules are now missing.
The Maven modules in the Git Submodules are found during the indexing phase…
in your question you are mixing git submodules and maven modules, which are conceptually two very different things. Can you clarify, which one are you talking about? Can you post (privately if needed) complete debug logs of sonar:sonar goal?
The root of my source is a Git checkout that includes two Git Submodules. Both the Git root and the Git Submodules include multiple Maven modules. Sonar is no longer showing any information for the Maven modules inside the Git Submodules
I do have a log file I can send. How do I send privately?
Is there any update on this?
I have the same issue with a git submodule that itself contains multiple nested gradle modules.
However I am seeing this issue on 7.7
Looking at the source of sonar-scm-git-plugin, I understand that actually it’s not strictly “adding exclusions based on project’s .gitignore”, but instead it’s ignoring every file that’s not managed by the root repository.
You can verify this running git ls-tree -r HEAD in your git repo. The submodule’s files are not listed and basically this is what the Git Plugin 1.8 is doing.
It would be nice if this could be fixed in time because all of our .net projects are using submodules for shared code and this issue results in incomplete scans and incomplete results.
@HeikoAdams I ended finding a tradeoff. Either you can have git blame for the repo or you can have SonarQube track the submodule. I felt that having the submodule reported was more important.
In the Git plugin settings in SonarQube you can change to this behavior.
But yes, having both blame and scanning for sub modules would be even better. Hope this helps!
I’m sorry, not the GIT plugin, the SCM plugin.
either you can disable it on a per-project basis like the screenshot here or you can disable for the entire instance.
[you must be a sonarqube admin to modify the settings]
For all of SonarQube: Administration > Configuration > General Settings > SCM > Disable the SCM Sensor
On a per project basis: Projects > select a project > Administration > Configuration > General Settings > SCM > Disable the SCM Sensor