-
Notifications
You must be signed in to change notification settings - Fork 24
/
.pre-commit-config.yaml
63 lines (63 loc) · 1.83 KB
/
.pre-commit-config.yaml
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
# disable autofixing PRs, commenting "pre-commit.ci autofix" on a pull request triggers a autofix
ci:
autofix_prs: false
repos:
# generic verification and formatting
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# standard end of line/end of file cleanup
- id: mixed-line-ending
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- repo: meta
# see https://pre-commit.com/#meta-hooks
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/codespell-project/codespell
# see setup.cfg
rev: v2.3.0
hooks:
- id: codespell
args: [--write-changes]
- repo: local
hooks:
- id: cep-header
name: CEP must start with a '# CEP \d - Title' header
entry: ^# CEP \d+ - .+$
language: pygrep
types: [text]
args: [--negate]
files: cep-.+\.md
- id: cep-nodash
name: CEPs must be referred to with 'CEP N' (no dash)
entry: CEP-+\d+
language: pygrep
types: [text]
files: cep-.+\.md
- id: cep-nozero
name: CEPs must be referred to with 'CEP N' (no leading zeros)
entry: CEP[- ]+0+\d+
language: pygrep
types: [text]
files: cep-.+\.md
- id: cep-hrefs
name: Links to CEPs must be relative (no leading slash)
entry: '\(/cep-\d{4}\.md\)'
language: pygrep
types: [text]
files: cep-.+\.md
- id: email-tags
name: Email addresses must use < and >
entry: <[^<>\s]+@[^<>\s]+>
language: pygrep
types: [text]
files: cep-.+\.md
- id: cep-filenames
name: CEP filenames must be 'cep-XXXX.md'
entry: CEP documents must be named '/cep-XXXX.md'
language: fail
files: ^.*cep-.*\.md.*$
exclude: ^cep-\d{4}\.md$