-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (58 loc) · 1.71 KB
/
Copy pathcode_checks.yml
File metadata and controls
62 lines (58 loc) · 1.71 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
push:
branches:
- '**' # target all branches
name: Static code checks
jobs:
clippy_check_ubuntu:
name: Clippy
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
# Checks enabled everywhere, including tests, benchmarks
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: >
--workspace --all-targets --
-D warnings
-A clippy::new_without_default
-W clippy::implicit_saturating_sub
-W clippy::implicit_clone
-W clippy::map_unwrap_or
-W clippy::unnested_or_patterns
-W clippy::manual_assert
-W clippy::unused_async
-W clippy::mut_mut
# Checks that only apply to production code
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: >
--workspace --lib --bins --examples --
-A clippy::all
-W clippy::unwrap_used
-W clippy::dbg_macro
-W clippy::items_after_statements
-W clippy::fallible_impl_from
-W clippy::string_slice
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
default: true
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Run rustfmt
run: cargo fmt --all -- --check