-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
77 lines (70 loc) · 2.11 KB
/
.pre-commit-config.yaml
File metadata and controls
77 lines (70 loc) · 2.11 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
# SPDX-FileCopyrightText: 2025 OPAL-RT Germany GmbH
# SPDX-License-Identifier: Apache-2.0
# 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: v5.0.0
hooks:
- id: trailing-whitespace
exclude: \.patch$|^paper\.md$
- id: end-of-file-fixer
exclude: \.(svg|patch)$
- id: check-ast
- id: check-xml
- id: check-yaml
- id: check-json
# devcontainer.json contains comments
exclude: .devcontainer/devcontainer\.json
- id: check-toml
- id: check-added-large-files
exclude: ^paper\.md$
- id: pretty-format-json
# black has its own mind of formatting Jupyter notebooks
exclude: \.ipynb$|^.devcontainer/devcontainer\.json$|package-lock\.json$
args:
- --no-sort-keys
- --autofix
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v17.0.6"
hooks:
- id: clang-format
files: \.(c|cpp|h|hpp)(\.in)?$
args: []
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.3"
hooks:
- id: editorconfig-checker
alias: ec
args:
- -disable-indent-size
- -exclude
- ^LICENSE$|^LICENSES/|\.ecf$
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.3.0"
hooks:
- id: black-jupyter
exclude: .*_pb2.pyi?$
args:
- --line-length=90
- repo: https://github.com/pycqa/flake8
rev: "7.3.0"
hooks:
- id: flake8
exclude: .*_pb2.pyi?$
args:
- --max-line-length=90
- repo: https://github.com/markdownlint/markdownlint
rev: "v0.13.0"
hooks:
- id: markdownlint
exclude: ^paper\.md$
args: [-r, "~MD013,~MD033,~MD024"]
- repo: local
hooks:
- id: dco-hook
name: check DCO
entry: ./tools/pre-commit-dco-hook.sh
language: script
stages: [prepare-commit-msg]