File tree Expand file tree Collapse file tree 2 files changed +0
-49
lines changed Expand file tree Collapse file tree 2 files changed +0
-49
lines changed Original file line number Diff line number Diff line change 63
63
with :
64
64
command : clippy
65
65
args : --all-targets --all-features --locked -- -D warnings
66
- - run : cargo clippy --all-targets --all-features --locked --message-format=json -- -D warnings 3>&1 2>&1 | tee clippy-${{ matrix.os }}.json
67
- - uses : actions/upload-artifact@v4
68
- with :
69
- name : report-${{ matrix.os }}
70
- path : clippy-${{ matrix.os }}.json
71
- retention-days : 7
72
-
73
66
- name : Tests
74
67
run : cargo test
75
-
76
- sonarqube :
77
- name : SonarQube
78
- runs-on : ubuntu-latest
79
- needs : test
80
- if : success() || failure()
81
- steps :
82
- - uses : actions/checkout@v4
83
- with :
84
- fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
85
- persist-credentials : false
86
-
87
- - uses : taiki-e/install-action@v2
88
- with :
89
- tool : cargo-sonar
90
- - name : Download clippy and artifact reports
91
- uses : actions/download-artifact@v4
92
- id : download
93
- with :
94
- path : clippy-reports
95
- pattern : report-*
96
- merge-multiple : true
97
- github-token : ${{ secrets.GITHUB_TOKEN }}
98
- - name : convert clippy reports
99
- run : |
100
- mkdir reports
101
- for file in clippy-reports/*; do cargo sonar --clippy --clippy-path $file --sonar-path reports/$(basename $file); done
102
- - name : list converted files
103
- id : files
104
- run : echo "reports=$(find reports -name "*.json" | paste -s -d ',' - )" >> $GITHUB_OUTPUT
105
- - name : SonarQube Scan
106
- uses : SonarSource/sonarqube-scan-action@v4
107
- env :
108
- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
109
- with :
110
- args : >
111
- -Dsonar.projectBaseDir=.
112
- -Dsonar.externalIssuesReportPaths=${{ steps.files.outputs.reports }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments