-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.pre-commit-config.yaml
60 lines (53 loc) · 1.88 KB
/
.pre-commit-config.yaml
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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: clippy
name: Check clippy
language: system
files: '([.]rs|Cargo\.toml)$'
pass_filenames: false
entry: rustup run --install nightly-2023-07-09 cargo-clippy -- --workspace --all-features -- -D warnings
- id: build-no-features
name: Check crate build with no features
language: system
files: '([.]rs|Cargo\.toml)$'
pass_filenames: false
entry: cargo check --workspace --no-default-features
- id: build-all-features
name: Check crate builds with all features
language: system
files: '([.]rs|Cargo\.toml)$'
pass_filenames: false
entry: cargo check --workspace --all-features --lib --bins --examples
- id: test
name: Check tests pass
language: system
files: '([.]rs|Cargo\.toml)$'
pass_filenames: false
entry: cargo test --workspace --bins --lib --examples --tests --all-features
- id: format
name: Check rustfmt
language: system
files: '([.]rs|Cargo\.toml)$'
pass_filenames: false
entry: rustup run --install nightly-2023-07-09 cargo-fmt --check
- id: msrv
name: Check MSRV compiles (lib only)
language: system
files: '([.]rs|Cargo\.toml)$'
pass_filenames: false
entry: rustup run --install 1.71.1 cargo check -p gamedig
- id: docs
name: Check rustdoc compiles
language: system
files: '([.]rs|Cargo\.toml)$'
pass_filenames: false
entry: env RUSTDOCFLAGS="-D warnings" cargo doc
- id: actions
name: Check actions work
language: system
files: '^[.]github/workflows/'
pass_filenames: false
entry: act --rm