File tree Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 2020 run : rustup update stable
2121 - name : Install cargo-llvm-cov
2222 uses : taiki-e/install-action@cargo-llvm-cov
23+ - name : Install Clippy
24+ run : rustup component add clippy
25+ - name : Install cargo-sonar and run Clippy
26+ run : |
27+ cargo install cargo-sonar
28+ cargo clippy --message-format json > my-clippy-report.json
29+ cargo sonar --clippy --clippy-path my-clippy-report.json
2330 - name : Generate code coverage
2431 run : >
2532 cargo llvm-cov
3138 uses : actions/upload-artifact@v4
3239 with :
3340 name : coverage-report
34- path : lcov.info
41+ path : |
42+ lcov.info
43+ sonar-issues.json
3544
3645 codecov :
3746 name : Upload to Codecov
5463 files : coverage.out
5564 token : ${{ secrets.CODECOV_TOKEN }} # required
5665 verbose : true # optional (default = false)
66+
67+ sonarqube :
68+ name : SonarQube
69+ runs-on : ubuntu-latest
70+ steps :
71+ - name : Checkout repository
72+ uses : actions/checkout@v5
73+ with :
74+ fetch-depth : 0
75+ - name : Download coverage artifact
76+ uses : actions/download-artifact@v5
77+ with :
78+ name : coverage-report
79+ - name : SonarCloud Scan
80+ uses : SonarSource/sonarqube-scan-action@master
81+ env :
82+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
83+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
84+ with :
85+ args : >
86+ -Dsonar.externalIssuesReportPaths=sonar-issues.json
87+ -Dcommunity.rust.lcov.reportPaths=lcov.info
Original file line number Diff line number Diff line change 1+ sonar.projectKey =sir-gon_algorithm-exercises-rust
2+ sonar.organization =sir-gon
3+
4+
5+ # This is the name and version displayed in the SonarCloud UI.
6+ # sonar.projectName=algorithm-exercises-rust
7+ # sonar.projectVersion=1.0
8+
9+
10+ # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
11+ # sonar.sources=.
12+
13+ # Encoding of the source code. Default is default system encoding
14+ # sonar.sourceEncoding=UTF-8
You can’t perform that action at this time.
0 commit comments