Issue with build-wrapper-output

sonarcfamily

(Jérémy Grosjean) #1

Hello everyone,

I’m using a script to trigger sonar cloud on bitrise but I have an issue I can’t fix

./sonar-scanner-3.2.0.1227-macosx/bin/sonar-scanner
-Dsonar.projectKey=MyProjectName
-Dsonar.organization=MyOrganisation
-Dsonar.sources=./MyProject
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=$SONAR_TOKEN
-Dsonar.pullrequest.branch=$BITRISE_GIT_BRANCH
-Dsonar.pullrequest.key=$BITRISE_PULL_REQUEST
-Dsonar.pullrequest.provider=GitHub
-Dsonar.pullrequest.github.repository=myRepository
-Dsonar.sources=./MyProject
-Dsonar.cfamily.build-wrapper-output.bypass=true

I have the error below:
‘sonar.cfamily.build-wrapper-output’ is mandatory

Can you tell me what I do wrong please? I’ve search work arround for hours now.
Thanks for reading me.

Jérémy


(Colin Mueller) #2

Jérémy,

sonar.cfamily.build-wrapper-output.bypass is no longer supported on SonarCloud as it is using a new version of SonarCFamily (v6.0) where this long deprecated parameter has been dropped.

I’d go ahead and check out our documentation on analyzing C/C++ code with the build wrapper

Colin


(Jérémy Grosjean) #3

Thanks for your reply.
I’ve check this part of the doc and I tried to set a path instead of using bypass. But I had an error
java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /Users/vagrant/git/./sonar-scanner-3.2.0.1227-macosx/bin/build-wrapper-dump.json

Indeed I don’t have a build-wrapper-dump.json but I don’t know how to download the Build Wrapper.
In the doc they told to download on local host has they create the server themself but I don’t know how to find the Build Wrapper in my case (I use SonarCloud).

I was not able to find mention of that in the doc.


(Colin Mueller) #4

This is a good point (and not the first time confusion has come from the docs referencing localhost).

For SonarCloud, you can substitute sonarcloud.io (https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip)


(Jérémy Grosjean) #5

Thank you for your help! It works now.