-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
47 lines (45 loc) · 1.3 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
# manual stage used to selectively run pre-commit jobs in CI which don't have a dedicated CI job already.
default_stages: ["pre-commit"]
repos:
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
language: rust
files: \.rs$
pass_filenames: false
entry: cargo fmt
args: ["--all", "--", "--check"]
- id: cargo-clippy
name: cargo clippy
language: rust
files: \.rs$
pass_filenames: false
entry: cargo clippy
args: ["--all-features", "--tests", "--", "-D", "warnings"]
- id: cargo-doc
name: cargo doc
language: rust
files: \.rs$
pass_filenames: false
entry: sh -c "RUSTDOCFLAGS='-D warnings' cargo doc"
args: ["--no-deps", "--all-features", "--workspace"]
- repo: https://github.com/ComPWA/mirrors-taplo
rev: v0.9.3
hooks:
- id: taplo-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
stages: ["pre-commit", "manual"]
- id: check-executables-have-shebangs
stages: ["pre-commit", "manual"]
- id: trailing-whitespace
stages: ["pre-commit", "manual"]
- id: end-of-file-fixer
stages: ["pre-commit", "manual"]
- id: forbid-submodules
stages: ["pre-commit", "manual"]
- id: forbid-new-submodules
stages: ["pre-commit", "manual"]