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
# Mirrors the checks `luminartech/rust_workflow` runs, so a failure shows up
# before the push rather than in CI. Install with `pre-commit install`.
#
# mdformat is deliberately absent, unlike the sibling protocol repos: it
# escapes `[` and `]`, and this crate's README and ARCHITECTURE.md are full of
# intra-doc-style references and tables that the escaping mangles.
#
# check-json is absent too: the only JSON here is `.vscode/launch.json`, which
# is JSONC. Excluding it instead would leave the hook matching nothing, and
# `check-hooks-apply` fails a hook that matches nothing.
default_language_version:
python: python3.12
default_stages:
default_install_hook_types:
repos:
# Squash-merge uses the PR title as the commit message, so the same grammar
# is checked on the commit locally.
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages:
args:
- --strict
- feat
- fix
- perf
- docs
- refactor
- revert
- style
- test
- chore
- ci
- build
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude_types:
- markdown
- id: end-of-file-fixer
exclude_types:
- rust
- id: check-yaml
args:
- id: check-added-large-files
args:
- id: check-merge-conflict
- id: mixed-line-ending
args:
exclude_types:
- batch
- repo: https://github.com/crate-ci/typos
rev: v1.39.1
hooks:
- id: typos
args:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.29.0
hooks:
- id: gitleaks
- repo: https://github.com/FeryET/pre-commit-rust
rev: v1.2.1
hooks:
- id: fmt
- id: cargo-check