Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Created September 26, 2023 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/d83db61402967cb215d83f516a87fa04 to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/d83db61402967cb215d83f516a87fa04 to your computer and use it in GitHub Desktop.
Demo - Sample Commands For SonarQube Scan of .NET Project
## --------------------------------------------------------------------------------
## STEP 1 - INSTALL DOTNET-SONARSCANNER (One Time Setup)
## --------------------------------------------------------------------------------
dotnet tool install --global dotnet-sonarscanner
## --------------------------------------------------------------------------------
## STEP 2 - BEGIN ANALYSIS
## --------------------------------------------------------------------------------
dotnet sonarscanner begin /k:"sample-web-api" /d:sonar.token="sqa_1s2s3om4t5o6k7e8e9n"
## --------------------------------------------------------------------------------
## STEP 3 - BUILD and TEST
## --------------------------------------------------------------------------------
dotnet build SampleWebApi.sln
## --------------------------------------------------------------------------------
## STEP 4 - END ANALYSIS
## --------------------------------------------------------------------------------
dotnet sonarscanner end /d:sonar.token="sqa_1s2s3om4t5o6k7e8e9n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment