Cake.Sonar

A Cake AddIn that allows will run the Sonar MSBuild Runner for csharp projects.

#addin nuget:?package=Cake.Sonar&version=1.1.25

<package id="Cake.Sonar" version="1.1.25" />

dotnet add package Cake.Sonar --version 1.1.25

<PackageReference Include="Cake.Sonar" Version="1.1.25" />

Aliases

Contains functionality for running a Sonar analysis on a c# project using the MSBuild SonarQube Runner.

In order to use the commands for this addin, include the following in your build.cake file to download and reference from NuGet.org:

#addin "nuget:?package=Cake.Sonar"
#tool "nuget:?package=MSBuild.SonarQube.Runner.Tool"

SonarScanner for MSBuild

Sonar(ICakeContext, Action<ICakeContext>, SonarBeginSettings) Run a self-contained analysis for the specified action. The action should run msbuild.
SonarBegin(ICakeContext, SonarBeginSettings) Initialise msbuild for sonar analysis.
SonarEnd(ICakeContext) Run the actual sonar analysis (no credentials given).
SonarEnd(ICakeContext, SonarEndSettings) Run the actual sonar analysis and push them to sonar. This call should follow after a SonarBegin and MSBuild.