-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
39 lines (39 loc) · 1.4 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-toml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: rust-formatting
name: Rust formatting
description: Run cargo fmt on files included in the commit. rustfmt should be installed before-hand.
entry: cargo fmt --all --
pass_filenames: true
types: [file, rust]
language: system
- id: rust-clippy
name: Rust clippy
description: Run cargo clippy on files included in the commit. clippy should be installed before-hand.
entry: cargo clippy --all -- -D warnings -D dead-code # only want dead code problems in CI and pre-commit
pass_filenames: false
types: [file, rust]
language: system
- id: msrv
name: Minimum Supported Rust Version (MSRV)
description: Check if the project can be built with the oldest supported Rust version. cargo-msrv should be installed before-hand.
entry: cargo msrv verify
pass_filenames: false
types: [file, rust]
language: system
- id: generate documentation
name: Generate documentation
description: Generate cargo documentation via cargo doc
entry: cargo +nightly doc --no-deps --all-features
pass_filenames: false
types: [file, rust]
language: system