No results for Git Submodules

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…

[INFO] --- sonar-maven-plugin:3.6.0.1398:sonar (default-cli) @ xxx-parent ---
[INFO] Bitbucket Cloud Pipelines detected
...
[INFO] SonarQube version: 7.8.0
...
[INFO] Indexing files of module 'inaseq-model'
[INFO]   Base dir: /opt/atlassian/pipelines/agent/build/inaseq/inaseq-common/inaseq-model
[INFO]   Source paths: pom.xml, src/main/java

But the JavaSquidSensor is not activating:

[INFO] ------------- Run sensors on module inaseq-model
[INFO] Sensor JavaXmlSensor [java]
[INFO] Sensor JavaXmlSensor [java] (done) | time=0ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms

I’ve not changed my configuration.

Versions when it did work:

[INFO] --- sonar-maven-plugin:3.6.0.1398:sonar (default-cli) @ coinzoom-parent ---
[INFO] Bitbucket Cloud Pipelines detected
...
[INFO] SonarQube version: 7.7.0

So this looks like a loss of functionality caused by the upgrade to SonarQube version: 7.8.0

hello @jim_b_o,

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?

Tibor,

Thanks for your response.

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

I have started another thread on this too.

Hi!

This seems to be related to:

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.

1 Like

perfect. thanks Felipe.
Looks like there is a 4yr old ticket open ticket for this very issue.
https://jira.sonarsource.com/browse/SONARSCGIT-6