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,
There doesn’t seem to be a “dry run” option as evidenced by this conversation about same: Scanner: Allow dryrun flag - #3 by Chris