SonarCube

Date: 2021-05-17

https://www.sonarqube.org/

Your teammate forCode Quality and Code Security

SonarQube empowers all developers to write cleaner and safer code.

Download SonarQube:

https://www.sonarsource.com/products/sonarqube/downloads/

# Install 
dotnet tool install --global dotnet-sonarscanner

# Update
dotnet sonarscanner begin /k:"MySolution Title" /d:sonar.host.url="http://localhost:9000"  /d:sonar.login="28fa984a31ff953c90e7f403275dcef25daaf55f"
dotnet build
dotnet sonarscanner end /d:sonar.login="28fa984a25ff953c90e7f403275dcef25daaf55f"
@echo off
						
set SONARQUBE_LOGINKEY="28fa984a25ff953c90e7f403275dcef25daaf55f"
set MSBUILD="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\MSBuild.exe"

::%MSBUILD% MySolution.sln /t:Rebuild /p:Configuration=Release /p:Platform="Mixed Platforms"
::exit 0


dotnet sonarscanner begin /k:"MySolution Title" /d:sonar.login=%SONARQUBE_LOGINKEY%
%MSBUILD% MySolution.sln /t:Rebuild /p:Configuration=Release /p:Platform="Mixed Platforms"
dotnet sonarscanner end /d:sonar.login=%SONARQUBE_LOGINKEY%

pause
50640cookie-checkSonarCube