SonarSource / sonar-scanner-msbuild

SonarScanner for .NET
http://redirect.sonarsource.com/doc/msbuild-sq-runner.html
GNU Lesser General Public License v3.0
362 stars 143 forks source link

Add support of environment variable to set CLI arguments/options #1761

Open sebastien-marichal opened 11 months ago

sebastien-marichal commented 11 months ago

For context see this discuss post (internal link).

The goal is to add the support of environment variables to set the options of the SonarScanner for .NET. Here is a list of such environment variables and their options counterpart:

Other scanners (maybe not all) support setting those options through the environment variables above.

During implementation, the order of precedence of the arguments/options provider should be clearly defined and aligned with other scanners.

Precedence

Those variables do not depend on anything (such as the SQ server), so generic precedence (taken from MS Documentation) can be applied (from highest to lowest priority):

gregory-paidis-sonarsource commented 5 days ago

Coming from this discuss post, we should also support, as mentioned here:

costin-zaharia-sonarsource commented 5 days ago

See also: https://github.com/SonarSource/sonar-scanner-msbuild/issues/1961

costin-zaharia-sonarsource commented 5 days ago

And also SONAR_USER_HOME