forked from SimpleITK/SimpleITK
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
58 lines (57 loc) · 1.81 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
# .pre-commit-config.yaml
# for details see https://pre-commit.com
# for list of available hooks see https://pre-commit.com/hooks.html
#
# Preclude commits that do not conform to various criteria.
#
# If a pre-commit check must be skipped then use: `SKIP=check_id git commit` Where `check_id` is the id of the check to
# be skipped such as `black`.
fail_fast: true
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: detect-private-key
- id: forbid-submodules
- id: check-json
- id: check-yaml
- repo: https://github.com/psf/black
rev: 24.2.0
hooks: # check conformance to black formatting
- id: black
args: ['--diff', '-v'] # if run without arguments, will fail and will format the files
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v11.1.0
hooks:
- id: clang-format
args: ['--style=file']
files: '\.(c|cc|h|cxx|hxx)$'
- repo: local
hooks:
- id: local-prepare-commit-msg
name: 'local prepare-commit-msg'
entry: 'Utilities/Hooks/prepare-commit-msg'
language: system
stages: [prepare-commit-msg]
- id: check-setup-for-development
name: 'Check version of SetupForDevelopment'
entry: 'Utilities/Hooks/check-setup-for-development'
language: system
stages: [pre-commit]
- id: kw-commit-msg
name: 'kw commit-msg'
entry: 'Utilities/Hooks/kw-commit-msg'
language: system
stages: [commit-msg]
- id: kw-pre-commit
name: 'kw-pre-commit'
entry: 'Utilities/Hooks/kw-pre-commit'
language: system
stages: [pre-commit]
- id: forbid-txx
name: 'forbid txx extensions'
entry: Files with the .txx extension are deprecated -- please use .hxx instead
files: '\.txx$'
language: fail
stages: [pre-commit]