-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 968 Bytes
/
rust_lints.yml
File metadata and controls
38 lines (33 loc) · 968 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
31
32
33
34
35
36
37
38
name: Rust Lints
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: rust-lints-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_LOG: "error"
RUST_BACKTRACE: short
CARGO_INCREMENTAL: 0
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Install latest nightly
run: rustup toolchain install nightly --component rustfmt --allow-downgrade
- name: Check Rust formatting
run: cargo +nightly fmt -- --check
clippy:
needs:
- rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Install Rust Clippy
run: rustup component add clippy
- name: Run Clippy Linter
run: cargo clippy -- -D warnings