-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
34 lines (31 loc) 路 1.03 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
34 lines (31 loc) 路 1.03 KB
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
# prek configuration - replaces .husky/hooks/pre-commit
# Install: cargo binstall prek && prek install
# Run manually: prek run --all-files
repos:
# Markdown formatting with dprint
- repo: local
hooks:
- id: dprint
name: dprint (markdown)
entry: dprint check --allow-no-files
language: system
types: [markdown]
pass_filenames: false
# Rust formatting
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all -- --check
language: system
files: (\.rs$|(^|/)(Cargo\.toml|Cargo\.lock|rust-toolchain(\.toml)?|build\.rs)$|^\.github/workflows/ci\.yml$)
pass_filenames: false
# Rust linting
- repo: local
hooks:
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --workspace --exclude demo-got --all-targets -- -D warnings
language: system
files: (\.rs$|(^|/)(Cargo\.toml|Cargo\.lock|rust-toolchain(\.toml)?|build\.rs)$|^\.github/workflows/ci\.yml$)
pass_filenames: false