-
-
Notifications
You must be signed in to change notification settings - Fork 8
30 lines (22 loc) · 611 Bytes
/
Copy pathlint.yml
File metadata and controls
30 lines (22 loc) · 611 Bytes
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
name: Lint and format check
on: [ pull_request ]
permissions:
contents: read
env:
RUSTFLAGS: "-Dwarnings" # treat warnings as errors
RUST_VERSION: "1.95.0"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v6
- name: Install rust.
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- name: Run Clippy.
run: cargo clippy --all-targets --all-features
- name: Run fmt check.
run: cargo fmt --all -- --check