-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
92 lines (86 loc) · 2.56 KB
/
.pre-commit-config.yaml
File metadata and controls
92 lines (86 loc) · 2.56 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
84
85
86
87
88
89
90
91
92
# Pre-commit hooks for platform
# 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$
)$
- id: check-yaml
args: ['--allow-multiple-documents']
- id: check-json
exclude: |
(?x)^(
.*tsconfig.*\.json$|
.*devcontainer.*\.json$|
.*/AI_QA/.*\.json$|
.*/tests/fixtures/.*\.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
- repo: https://github.com/gitleaks/gitleaks
rev: v8.22.1
hooks:
- id: gitleaks
- 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)
description: Run clippy on entire workspace
entry: cargo clippy --workspace --all-features -- -D warnings
language: system
types: [rust]
pass_filenames: false
stages: [pre-push, manual]
exclude: |
(?x)^(
target/|
.*/target/|
\.cargo/|
\.git/|
node_modules/|
.*/node_modules/|
.*\.lock$|
.*\.min\.js$|
.*\.min\.css$|
.*\.cjs$|
\.yarn/.*|
\.pnp\.*|
packages/rs-sdk/tests/vectors/.*|
packages/rs-drive-abci/tests/supporting_files/.*|
packages/rs-drive/tests/supporting_files/.*|
packages/wallet-lib/fixtures/.*|
packages/wasm-drive-verify/tests/fixtures/.*|
packages/dapi-grpc/clients/.*|
.*_pb\.js$|
.*_pb\.d\.ts$|
.*_pb_service\.js$|
.*_pb_service\.d\.ts$|
.*\.pbrpc\.h$|
\.github/grpc-queries-cache\.json|
CHANGELOG\.md
)$