The analysis run by sonar-scanner
no longer finds any files to analyze in all my Java projects.
See for example this build. It has been run using the sonar-scanner -X
option to enable full debugging info.
Scroll down to line 994 and following of the build log. You will see lines like this:
14:05:44.136 DEBUG: File Core/src/package-info.java was excluded by sonar.javascript.exclusions or sonar.typescript.exclusions
14:05:44.136 DEBUG: 'Core/src/package-info.java' excluded by org.sonar.plugins.javascript.JavaScriptExclusionsFileFilter
It turns out that all the Java source files in the project are excluded by this JavaScriptExclusionsFileFilter
. Yet the project contains no JS at all, and the sonar configuration file makes no mention of sonar.javascript.exclusions
or sonar.typescript.exclusions
. Running the sonar scanner locally with the same settings and configuration correctly analyses all the files.
The analysis has been working correctly on Travis for years, and I didn’t change anything to the configuration files before it started having this issue. Compare for example this past build with the same configuration, and where Sonar does analyze all the files as it should.
I don’t know if this is a Sonar issue or a Travis issue, but since the same project and config files work OK on my local machine, I would lean towards Travis. Maybe there is something specific to the Sonar installation in Travis that triggers this problem?