forked from rorni/mckit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
100 lines (89 loc) · 2.52 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
100 lines (89 loc) · 2.52 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
93
94
95
96
97
98
99
100
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See:
# https://pre-commit.com/ and
# https://github.com/pre-commit/pre-commit for more information
# https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.13
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v6.0.0"
hooks:
- id: check-added-large-files
exclude: uv.lock
- id: check-ast
exclude: notebooks
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
exclude: notebooks
- id: check-merge-conflict
exclude: \.rst$
- id: check-shebang-scripts-are-executable
exclude: notebooks # jupytext creates python scripts with shebangs but without permissions
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
exclude: notebooks
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
exclude: data|.ipynb$|^\.
- id: name-tests-test
exclude: common.py|help*.*py
args:
- --pytest-test-first
- id: mixed-line-ending
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii, --no-sort-keys]
exclude: data|\.ipynb$
- repo: https://github.com/fredrikaverpil/creosote
rev: v5.2.0
hooks:
- id: creosote
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.15
hooks:
- id: uv-lock
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.14
hooks:
- id: ruff-check
exclude: ^notebooks|^extern
# formatter
- id: ruff-format
exclude: ^notebooks|^extern|ipynb$
# Check for common shell mistakes
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.11.0.1"
hooks:
- id: shellcheck
args: [ --external-sources ]
stages: [ manual ]
# CMake formatting
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: "v0.6.13"
hooks:
- id: cmake-format
additional_dependencies: [ pyyaml ]
types: [ file ]
files: (\.cmake|CMakeLists.txt)(.in)?$
# Clang format the codebase automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v22.1.5"
hooks:
- id: clang-format
types_or: [c++, c, cuda]