Skip to content

Commit

Permalink
chore(gh): static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-N-Chernyshov committed Jan 23, 2024
1 parent 2afec11 commit 1e42ac4
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Cargo fmt & clippy

on:
pull_request:
push:
branches: [master, develop]

env:
CARGO_TERM_COLOR: always

jobs:
static_analysis:
runs-on: ubuntu-latest

steps:
# v4.1.1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: 'true'

# v2.1.0
- uses: arduino/setup-protoc@a8b67ba40b37d35169e222f3bb352603327985b6

# v2.7.1
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8

# v2.20.16
- name: cargo install
uses: taiki-e/install-action@ac89944b5b150d78567ab6c02badfbe48b0b55aa
with:
tool: clippy-sarif, sarif-fmt

- name: cargo fmt
run: cargo fmt --check

- name: cargo clippy
env:
SKIP_WASM_BUILD: 1
run: cargo clippy --all-targets --features runtime-benchmarks
--message-format=json -- -D warnings | clippy-sarif | tee results.sarif | sarif-fmt
shell: bash

- name: Upload SARIF file
if: always()
# v2.24.2
uses: github/codeql-action/upload-sarif@49abf0ba24d0b7953cb586944e918a0b92074c80
with:
sarif_file: results.sarif

0 comments on commit 1e42ac4

Please sign in to comment.