SonarQube Scanner 3.2.0.1227|
Java 1.8.0_232 AdoptOpenJDK (64-bit)|
Linux 4.14.186-146.268.amzn2.x86_64 amd64|
SonarQube server 8.4.1
sonar.sources=app,config,lib
sonar.exclusions=app/assets/**/*
I am having a problem with my ruby on rails project in bamboo. My RSpec and coverage reports are run in a Docker container in the following path:
“/usr/src/app”
so the resulting simplecov .resultset.json
has the files all listed in that path.
Sonar is not ran in Docker so the path to the files is different.
I assumed Sonar was complaining as it could not find the files in this path, so I used a script to manipulate the .resultset.json
file and replace all the “/usr/src/app” with the correct local directory that Sonar is running in.
But I am still getting the error on every file not being found, even though the files are correct.
e.g.
WARN: File 'app/services/detail_service.rb' is present in coverage report but cannot be found in filesystem.
What way does Sonar expect the paths to be in the coverage file? Absolute paths or relative?