Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/sonarqube-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: SonarQube Analysis

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest

steps:
- name: SonarScanner for .NET 9 with pull request decoration support
uses: highbyte/[email protected]
with:
# The key of the SonarQube project
sonarProjectKey: Psychoboy_PenguinTwitchBot
# The name of the SonarQube project
sonarProjectName: PenguinTwitchBot
# The name of the SonarQube organization in SonarCloud. For hosted SonarQube, skip this setting.
sonarOrganization: psychoboy
dotnetBuildArguments: ./DotNetTwitchBot/DotNetTwitchBot.csproj
# Optional command arguments to dotnet test
dotnetTestArguments: --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider adding a description of what this argument does to improve readability and maintainability.

dotnetTestArguments: --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover # Generates code coverage reports in OpenCover format

# Optional extra command arguments the the SonarScanner 'begin' command
sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider adding a description of what this argument does to improve readability and maintainability.

sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" # Specifies the paths to the OpenCover and VSTest reports



Loading