File tree Expand file tree Collapse file tree
actions/dotnet/build-test-sonar Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 type : boolean
4949 required : false
5050 default : false
51+ sonar-exclusions :
52+ description : Files or directories that should be excluded from Sonar analysis
53+ type : string
54+ required : false
55+ default : " node_modules"
5156 sonar-host-url :
5257 description : Sonar host URL
5358 type : string
@@ -150,10 +155,11 @@ jobs:
150155 uses : ./workflow-parts/actions/dotnet/build-test-sonar
151156 with :
152157 dotnet-test-args : ${{ inputs.dotnet-test-args }}
153- sonar-organization : ${{ inputs.sonar-organization }}
158+ sonar-exclusions : ${{ inputs.sonar-exclusions }}
154159 sonar-host-url : ${{ inputs.sonar-host-url }}
155- sonar-project-name : ${{ inputs.sonar-project-name }}
160+ sonar-organization : ${{ inputs.sonar-organization }}
156161 sonar-project-key : ${{ inputs.sonar-project-key }}
162+ sonar-project-name : ${{ inputs.sonar-project-name }}
157163 sonar-token : ${{ secrets.sonar-token }}
158164 - name : Check license compliance with FOSSA
159165 if : ${{ inputs.fossa-enabled }}
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ inputs:
1010 description : Java version that will be installed (for Sonar CLI)
1111 required : false
1212 default : " 21"
13+ sonar-exclusions :
14+ description : Files or directories that should be excluded from Sonar analysis
15+ required : false
16+ default : " **/node_modules/**"
1317 report-folder :
1418 description : Folder where report files will be generated
1519 required : false
7175 /d:sonar.token="${{ inputs.sonar-token}}" \
7276 /d:sonar.host.url="${{ inputs.sonar-host-url }}" \
7377 /d:sonar.cpd.exclusions="**/*Generated*.cs,${{ inputs.report-folder }}/**" \
74- /d:sonar.exclusions="${{ inputs.report-folder }}/**/* " \
78+ /d:sonar.exclusions="${{ inputs.report-folder }}/**,${{ inputs.sonar-exclusions }} " \
7579 /d:sonar.coverageReportPaths="${{ inputs.report-folder }}/SonarQube.xml" \
7680 /d:sonar.cs.vstest.reportsPaths="${{ inputs.report-folder }}/TestResults/*.trx"
7781 shell : bash
You can’t perform that action at this time.
0 commit comments