Either use Cake.Chocolatey.Module or ensure sonar-scanner is on your path
#tool "choco:?package=sonarcube-scanner&version=3.0.3.778&include=./**/*.bat"
#addin "nuget:?package=Cake.SonarScanner"
// Assuming a sonar-scanner.properties on the current directory
SonarScanner(new SonarScannerSettings {
Properties = new Dictionary<string, string> {
{"sonar.login", EnvironmentVariable("sonar_scanner_token")}
}
});