J4VMC
(Javier)
July 1, 2019, 3:20pm
1
Hello,
We’re using SonarCloud and when I first set it up I got a code string with parameters to trigger the analysis from the sonar-scanner CLI, but I’ve lost it and can’t find it now that the codebase was analysed once.
Where can I find this long string again?
Thanks.
1 Like
Hi,
You have the documentation of the sonar-scanner CLI here if you want the parameters : https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/
Do you use a CI tool along with SonarCloud ?
Mickaël
J4VMC
(Javier)
July 2, 2019, 5:45am
3
Hi, thanks for the link, but I was already aware of it. What I don’t know is how to concatenate the parameters and how to start and end the string.
No, I just want to trigger the analysis from the CLI
As long as you are calling it from a “standard” CLI (bash, powershell,…) you have to call it like this :
.\sonar-scanner -Dparam=value -Dparam2=value2 …
Is that you wanted ?
Mickaël
J4VMC
(Javier)
July 2, 2019, 7:59am
6
Doesn’t seem to work, I get the following:
ERROR: Unrecognized option: -sonar.host.url=https://sonarcloud.io
You should add the “'D” in capital after the dash and before the property name, like -Dsonar.host.url=…