Skip to content

Commit c1bcb13

Browse files
committed
Add configuration for prek/pre-commit
1 parent 3ea372a commit c1bcb13

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.pre-commit-config.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
fail_fast: true
4+
5+
exclude: |
6+
(?x)^(
7+
.*/(assets)/.*|
8+
)$
9+
10+
repos:
11+
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
12+
rev: v6.0.0
13+
hooks:
14+
- id: trailing-whitespace
15+
#- id: end-of-file-fixer
16+
- id: check-yaml
17+
- id: check-added-large-files
18+
19+
- repo: local
20+
hooks:
21+
- id: cargo-fmt
22+
name: cargo fmt
23+
entry: cargo fmt --
24+
language: system
25+
types: [rust]
26+
pass_filenames: false # This makes it a lot faster
27+
28+
- id: cargo-clippy
29+
name: cargo clippy
30+
language: system
31+
types: [rust]
32+
pass_filenames: false
33+
entry: cargo clippy --all-targets --all-features -- -D warnings
34+
35+
- id: cargo-rdme
36+
name: cargo rdme
37+
language: system
38+
types: [rust]
39+
pass_filenames: false
40+
entry: cargo rdme -c

0 commit comments

Comments
 (0)