Skip to end of metadata
Go to start of metadata

Setting Shared Analysis Parameters

Analysis parameters can be set globally for all projects through the SonarQube user interface.

To share analysis parameter among a subset of projects, place the values in an XML settings file:

<?xml version="1.0" encoding="utf-8" ?>
<SonarQubeAnalysisProperties  xmlns:xsi="" xmlns:xsd="" xmlns="">
  <Property Name="sonar.verbose">true</Property>

The path to this XML file must be passed using the "/s:path" syntax on the command line or using the Setttings File value in the Team Foundation Server 2015 Begin Build Step.

Not all parameters can be specified in this file

The parameter "sonar.projectBaseDir" cannot be used within this shared file.

Setting Per-Project Analysis Parameters

This is not a common use case

Most analysis parameters such as "sonar.verbose" cannot be set on a per-project basis.

Since SonarC# 6.7 / SonarVB 4.2, most of the properties set in projects are ignored without any warning.

Some analysis parameters can be set for a single MSBuild project by adding them to its .csproj file.

  <SonarQubeSetting Include="sonar.stylecop.projectFilePath">

Setting Per-Analysis Parameters

You can specify properties on the analysis command line using /d. As an example

  • No labels