-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-hooks.yaml
More file actions
68 lines (60 loc) · 1.92 KB
/
Copy path.pre-commit-hooks.yaml
File metadata and controls
68 lines (60 loc) · 1.92 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
- id: dbg-check
name: Check for `dbg`
description: Ensure no `dbg` statements, macros or expressions included in source files.
entry: ./validate-dbg.sh
language: script
types: [text]
- id: pragma-once
name: Check for `#pragma once`
description: Ensure all header files have `#pragma once` before any other imports.
entry: ./validate-pragma.sh
language: script
types_or: [c++, file]
files: \.(hpp|h\+\+|hxx|cuh)$
- id: mypy
name: Run MyPy
description: MyPy
entry: ./run-mypy.sh
language: script
types: [python]
require_serial: true
- id: todo-check
name: Check for `todo`s
description: Check for 'todo' or 'fixme' left in source files.
entry: ./validate-todo.sh
language: script
types: [text]
exclude: \.pre-commit-config\.yaml$
- id: spell-check-commit-msgs
name: Spell check commit message
description: Check for spelling errors in commit messages.
entry: run-spell-check.sh
language: python
stages: [commit-msg]
additional_dependencies: [codespell]
- id: version-txt-auto-msg
name: Write automated message when version.txt is changed
description: Format commit messages to version.txt as "Bump version X.X.X -> Y.Y.Y".
entry: version-txt-auto-msg.sh
language: script
stages: [prepare-commit-msg]
- id: mirror-auto-msg
name: Write automated message when .mirror.lock is changed
description: Add the message "Install mirror" or "Sync mirror" when mirror files are updated.
entry: mirror-auto-msg.sh
language: script
stages: [prepare-commit-msg]
- id: absolute-imports-check
name: Check for absolute imports
language: script
entry: validate-absolute-imports.sh
types: [python]
exclude: __main__\.py$
- id: list-untracked-files
name: List untracked files
description: List untracked files if any, and exit with code 0 (unless an internal error occurs).
always_run: true
pass_filenames: false
language: script
entry: list-untracked-files.sh
verbose: true