-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
41 lines (41 loc) · 1.29 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
ci:
autoupdate_schedule: quarterly
skip: [cargo-check, cargo-clippy]
repos:
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt
language: rust
types: [rust]
args: ["--all", "--"]
- id: cargo-check
name: cargo check
entry: cargo check
language: rust
types: [rust]
args: ["--workspace"]
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy
language: rust
types: [rust]
# https://doc.rust-lang.org/stable/clippy/
args: [
"--workspace",
"--",
"-Dwarnings",
"-Dclippy::pedantic",
"-Dclippy::nursery",
"-Dclippy::cargo",
# "Expect many false positives" https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
"-Aclippy::must_use_candidate",
# "It’s not bad at all." https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
"-Aclippy::cast-precision-loss",
# https://github.com/seanmonstar/pretty-env-logger/pull/49
# https://github.com/eminence/terminal-size/pull/49
"-Aclippy::multiple-crate-versions",
]
pass_filenames: false