- Versions used: SonarQube Scanner 18.104.22.1688
- Platform: Travis CI under Ubuntu 18.04
The analysis run by
sonar-scanner no longer finds any files to analyze in Travis 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:
It turns out that all the Java source files in the project are excluded by this
The working directory in Travis is…
As a result, the filter discards all the files in a Travis build. Quoting Travis’ staff:
This is a bug (oversight) in the pattern matching behavior in my book. These patterns are meant to be matched against the part of the path under the project root rather than absolute path.
Adding these two lines in
This overrides the (incorrect) exclusion pattern in the JS plugin and allows files to be included again.