-
Notifications
You must be signed in to change notification settings - Fork 47
/
.pre-commit-config.yaml
69 lines (68 loc) · 1.88 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
64
65
66
67
68
69
default_language_version:
python: python3
exclude: '^tools/(build_utils/fypp)'
fail_fast: false
minimum_pre_commit_version: 3.2.0
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.8.2'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
exclude: >-
(?x)^(
.cp2k/.*|
)$
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
name: Reformat Python files with the black code formatter
files: '^.*(/PACKAGE)|(\.py)$'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-yaml
- id: check-symlinks
- id: trailing-whitespace
- repo: https://github.com/fortran-lang/fprettify
rev: v0.3.7
hooks:
- id: fprettify
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
exclude: >-
(?x)^(
cmake/(CheckFortranSourceRuns|CompilerConfiguration|Find(BLAS|LAPACK)|GetGitRevisionDescription).cmake|
)$
- repo: local
hooks:
- id: check-header
name: check file headers
entry: ./.pre-commit/check_header.py --verbose
language: script
types: [text]
exclude: >-
(?x)^(
tools/.*|
.cp2k/.*|
.cmake-format.py|
src/acc/hip/dbcsr_hip_profiling.F|
)$
- id: check-doxygen-tags
name: no doxygen tags present
entry: '^\s*!>'
language: pygrep
types: [text]
- id: clang-format-fypp
name: clang-format-fypp
description: Format files with ClangFormat, ignore FYPP directives.
entry: ./.pre-commit/clang-format-fypp.sh
language: python
files: \.(c|cc|cxx|cpp|cl|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|mm|proto|textproto|vert)$
args: ['-i', '-fallback-style=none', '--style=file']
# specify version since clang-format is not stable version-to-version
additional_dependencies: ['clang-format~=19.1.0']