Closed WebDucer closed 6 years ago
Hi @WebDucer,
I think that the SonarBeginSettings allow to add generic parameters by using the ArgumentCustomization property. This is implemented on the ToolSettings
base class and the Cake.Sonar addin also adds the contents to the command line when executing the runner tool.
So in order to add your custom property you can just do the following:
SonarBegin(new SonarBeginSettings{
/* Regular Settings Here */
ArgumentCustomization = args => args
.Append("/d:sonar.gitlab.project_id=XXXX")
.Append("/d:sonar.gitlab.xxx=XXXX")
});
Please note the /d:
in front of the actual settings name.
I didn't try if it actually works, only that the settings are also passed to the runner (by the --verbosity=diagnostic switch).
Best regards, Philipp
Thanks. I will try it out.
Sonar has a lot of plugins with its own configuration. Please add the possibility to add this in generic way (something like
MSBuildSettings
withWithProperty(string, string[])
extension mehtod). In my case, I want to add the project id for the GitLab repository of the analysed project (sonar.gitlab.project_id
).