I want to make a dry run with the sonarscanner to see if the sonarscanner run would work. So i don’t want to upload the result to any Sonarqube instance. I run into the problem, that the key property is required. Is there a dry run option? Or a work around?
You could use SonarLint for visual studio which should give you similar results (depending on the version of the scanner compared to the one on the server)
Or you could spin up sonarqube locally in a docker container and set up a project there and publish the results into that.
I don’t know what you mean about testing if “sonarscanner would run properly” - I assumed you meant would the code pass the quality rules.
If that is what you mean then SonarLint in connected mode essentially does that for you on the fly.
If you mean you want to check if it could execute correctly and upload the results to the server instance (regardless of whether the code passes or fails the quality gates) then, aside from running an instance locally, you could create a test project in your existing instance and upload to that by specifying a different project key,