-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
92 lines (92 loc) · 3.38 KB
/
.pre-commit-config.yaml
File metadata and controls
92 lines (92 loc) · 3.38 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: 'v6.0.0'
hooks:
- id: 'check-executables-have-shebangs'
- id: 'check-merge-conflict'
- id: 'no-commit-to-branch'
args: ['--branch', 'devel', '--branch', 'master']
- id: 'check-ast'
- id: 'check-json'
- id: 'end-of-file-fixer'
- id: 'trailing-whitespace'
args: ['--markdown-linebreak-ext=md']
exclude: '.gitlab/issue_templates/bugreport.md'
- repo: 'https://github.com/pocc/pre-commit-hooks'
rev: 'v1.3.5'
hooks:
- id: 'clang-tidy'
# Mute linker warning on unused flags "-Wl,-rpath=<mpc-install>/lib64"
args: ['--extra-arg=-Wnounused-command-line-argument', '--quiet', '--use-color']
stages: ['pre-commit', 'pre-merge-commit', 'pre-push']
exclude: |-
(?x)
^cmake/example/t.c$|
^tests/
# FIXME:
# 1. sctk_lib_thread_db.c contains unmuteable false positives on "ambiguous" calls
# with # pragma weak and extern functions. This a known LLVM issue, see
# https://github.com/llvm/llvm-project/issues/16067
# 2. dataloop and mpitypes contain files from an external library
# adapted to MPC. Within those files, there are a number of errors
# and warning that would probably require a large refactoring.
- id: 'uncrustify'
args: ['-c', 'uncrustify.cfg', '-q']
exclude: |-
(?x)
^src/MPC_Lowcomm/src/cplane/auth|
^src/MPC_Common/src/debugger.c$|
^src/MPC_OpenMP/src/mpcomp_alloc\.c$|
^cmake/example/t.c$|
^tests/
- repo: 'local'
hooks:
- id: 'git-blame-ignore-revs'
name: 'configure git blame to ignore reformatting commits'
description: 'Configure git blame to ignore commits listed in .git-blame-ignore-revs'
entry: 'git config blame.ignoreRevsFile .git-blame-ignore-revs'
language: 'system'
pass_filenames: false
minimum_pre_commit_version: '0'
- id: 'typos'
name: 'typos'
description: 'Source code spell checker'
language: 'system'
entry: 'typos'
args: ['-c', 'utils/.typos.toml', '--force-exclude']
types: ['text']
stages: ['pre-commit', 'pre-merge-commit', 'pre-push', 'manual']
exclude: |-
(?x)
^.clang-tidy$|
^config/|
^cmake/example/t.c$|
^src/MPC_Threads/src/ethread_posix.c$| # False positive on french comments
^tests/
exclude: |-
(?x)
uthash\.h$|
utlist\.h$|
utarray\.h$|
^src/MPC_Common/include/sctk_no_alloc\.h$|
^src/MPC_Common/include/mpc_common_profiler_keys\.h$|
^src/MPC_Fortran|
^src/MPC_IO/src/romio|
^src/MPC_IO/include/mpio.h.in|
^src/MPC_Lowcomm/src/portals|
modex|
^src/MPC_MPI/src/dataloop|
^src/MPC_MPI/src/mpitypes|
^src/MPC_MPI/include/nbc\.h$|
^src/MPC_MPI/src/mpc_nbc\.c$|
^src/MPC_OpenMP/include/omp_lib\.h$|
^src/MPC_OpenMP/include/omp_lib_kinds\.h$|
^src/MPC_OpenMP/tools/|
^src/MPC_Tests|
^src/MPC_Thread_db/src/gdb/linux-thread-db\.c$|
^src/MPC_Thread_db/src/sctk_lib_thread_db\.c$|
^src/MPC_Thread_db/src/test/|
hwloc|
\.(m4|3in|f90)$