-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
83 lines (77 loc) · 2.36 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
83 lines (77 loc) · 2.36 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Pre-commit hooks for grovedb
# Install: pip install pre-commit && pre-commit install && pre-commit install --hook-type pre-push
# See https://pre-commit.com for more information
repos:
# ============================================================================
# FAST CHECKS - Run on every commit.
# ============================================================================
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: |
(?x)^(
.*\.md$|
.*mermaid.*\.js$
)$
- id: end-of-file-fixer
exclude: |
(?x)^(
docs/book/output/.*|
.*mermaid.*\.js$
)$
- id: check-yaml
args: ['--allow-multiple-documents']
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: mixed-line-ending
args: ['--fix=lf']
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
exclude: '\.rs$' # Rust inner attributes (#![...]) look like shebangs
- repo: https://github.com/crate-ci/typos
rev: v1.40.0
hooks:
- id: typos
args: ['--write-changes']
exclude: |
(?x)^(
.*\.lock$|
docs/book/output/.*|
docs/book/translations/.*/src/.*|
.*mermaid\.min\.js$
)$
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
description: Format Rust code with rustfmt
entry: cargo fmt --all
language: system
types: [rust]
pass_filenames: false
# ============================================================================
# SLOW CHECKS - Run on git push only.
# ============================================================================
- repo: local
hooks:
- id: clippy
name: clippy (workspace strict)
description: Strict clippy on entire workspace - deny all warnings
entry: python3 contrib/run_clippy.py
language: system
types: [rust]
pass_filenames: false
stages: [pre-push, manual]
exclude: |
(?x)^(
target/|
.*/target/|
\.cargo/|
\.git/|
docs/book/output/
)$