-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (46 loc) · 1.4 KB
/
sonarcloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Sonar
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
sonar:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Analyzing code with Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt install libzmq3-dev lld
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
- name: Run cargo clippy
run: cargo clippy --workspace --all-features --message-format=json -- --warn clippy::pedantic > clippy.json
- name: Install 'cargo-sonar'
run: cargo install cargo-sonar --version 0.9.0 --locked
- name: Convert into Sonar compatible format
run: cargo-sonar --features clippy --clippy-path clippy.json
- name: Run sonar-scanner
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=Hove_loki
-Dsonar.projectName=loki
-Dsonar.sources=.
-Dsonar.sourceEncoding=UTF-8
-Dsonar.externalIssuesReportPaths=sonar.json
-Dsonar.organization=hove-io
-Dsonar.verbose=true