File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ _Currently does not support username/password authentication and presumes you ar
88
99``` yaml
1010- name : Sonarscanner for dotnet
11- uses : Secbyte/dotnet-sonarscanner@v1.0
11+ uses : Secbyte/dotnet-sonarscanner@v1.1
1212 with :
1313 buildCommand : dotnet build .
1414 testCommand : dotnet test .
@@ -17,6 +17,7 @@ _Currently does not support username/password authentication and presumes you ar
1717 sonarOrganisation : an-org
1818 verbose : " true"
1919 openCoverPaths : " tests/coverage.opencover.xml"
20+ coverageExclusions : " **test*.cs"
2021 env :
2122 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
2223 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -51,6 +52,9 @@ verbose:
5152openCoverPaths :
5253 description : " Path(s) to coverage file(s)"
5354 required : false
55+ coverageExclusions :
56+ description : " Glob(s) for files to exclude from coverage"
57+ required : false
5458` ` `
5559
5660## Environment variables
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ inputs:
2929 openCoverPaths :
3030 description : " Path(s) to coverage file(s)"
3131 required : false
32+ coverageExclusions :
33+ description : " Glob(s) for files to exclude from coverage"
34+ required : false
3235
3336runs :
3437 using : " docker"
4245 - ${{ inputs.sonarOrganisation }}
4346 - ${{ inputs.verbose }}
4447 - ${{ inputs.openCoverPaths }}
48+ - ${{ inputs.coverageExclusions }}
4549
4650branding :
4751 icon : ' check'
Original file line number Diff line number Diff line change 88# sonarOrganisation = $6
99# verbose = $7
1010# openCoverPaths = $8
11+ # coverageExclusions = $9
1112
1213set -eu
1314
4445 begin_cmd=" $begin_cmd /d:sonar.cs.opencover.reportsPaths=\" $8 \" "
4546fi
4647
48+ if [ -n " $9 " ]
49+ then
50+ begin_cmd=" $begin_cmd /d:sonar.coverage.exclusions=\" $9 \" "
51+ fi
52+
4753if [ -n " ${SONAR_TOKEN} " ]
4854then
4955 begin_cmd=" $begin_cmd /d:sonar.login=\" ${SONAR_TOKEN} \" "
You can’t perform that action at this time.
0 commit comments