Since updating to version 7.2 of sonar-scanner-gradle we no longer get any analysis of our frontend files. We use a multi-module repo with mainly kotlin and typescript code. The typescript files are no longer detected after updating to 7.2.1.6560 or 7.2.2.6593.
I noticed the following difference in debug output while executing the scanner locally:
7.1.x:
Preprocessing files...
3 languages detected in 143 preprocessed files (done) | time=289ms
16 files ignored because of inclusion/exclusion patterns
0 files ignored because of scm ignore settings
Loading plugins for detected languages
7.2.x:
Preprocessing files...
1 language detected in 56 preprocessed files (done) | time=556ms
16 files ignored because of inclusion/exclusion patterns
0 files ignored because of scm ignore settings
Loading plugins for detected languages
We haven’t used it so far. But if I enable it I now get
Preprocessing files… 11 languages detected in 320 preprocessed files (done) | time=3154ms 30 files ignored because of inclusion/exclusion patterns 78531 files ignored because of scm ignore settings Loading plugins for detected languages
So this is more than we used to analyze. Probably because it ignores the sonar.sources property.
So I’m not sure why your other files were being picked up before. Did you have a custom sonar.sources? Per the docsscanAll is disabled when sonar.sources is specified explicitly…
Anyway, this is the mechanism we added to pick up those other files. Now you’ll want to use exclusions, if necessary, to whittle down the expanded source set.
I think I got it now. We did not set sonar.sourcesglobally. We only set it in the module with the frontend files. Anywhere else we used the standard behaviour. This seemed to work until version 7.2.x. Now the scanner seems to ignore all properties set in the submodules. Do you have any idea why? Was this approach not supported and did it work only by accident?
Okay, it turns out that there’s a bug in the latest version of the Gradle scanner. We’re on it. And in the meantime, a reversion to version 7.1.0.6387 will restore the correct behavior.
@ganncamp 's recommendation of downgrading to 7.1 is the right way to go to ensure that your project is properly analyzed. I amended the original announcement post to recommend downgrading to 7.1 until we work on fix.
Sorry for the inconvenience and thank you for your patience.