-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
99 lines (98 loc) · 3.13 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
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
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: (thirdparty|cpp/sophus2)/.*$
- id: check-yaml
- id: check-json
exclude: docs/.*$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
hooks:
- id: mypy
args: ["--check-untyped-defs", "--ignore-missing-imports", "--explicit-package-bases"]
additional_dependencies: ["types-protobuf==4.24.0.1", "types-requests"]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.13
hooks:
- id: insert-license
files: cpp/sophus/.*\.(h|hpp|cpp|proto|ipp)$
exclude: (thirdparty|sympy/cpp_gencode)/.*$
args:
- --comment-style
- //
- --license-filepath
- sophus2_license_header.txt
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.13
hooks:
- id: insert-license
files: \.(h|cpp|proto|ipp)$
exclude: (thirdparty|cpp/sophus)/.*$
args:
- --comment-style
- //
- --license-filepath
- license_header.txt
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.0
hooks:
- id: clang-format
files: \.(h|cpp|ipp)
exclude: (cpp/sophus/sympy|thirdparty)/.*$
- repo: local
hooks:
- id: pragma-once
name: pragma once check
entry: "#pragma once"
language: pygrep
exclude: thirdparty/.*$
files: \.h$
args: [--negate]
- id: no-c-std-lib
name: c standard library check
exclude: thirdparty/.*$
entry: |
(?x)<(
assert|complex|ctype|errno|fenv|float|inttypes|iso646|limits|locale|math|setjmp|signal|
stdalign|stdarg|stdatomic|stdbool|stddef|stdint|stdio|stdlib|stdnoreturn|string|tgmath|
threads|time|uchar|wchar|wctype
).h>
language: pygrep
files: \.(h|cpp)$
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [feat, fix, docs, style, refactor, perf, test, ci, build, chore, revert]
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
exclude: (thirdparty|cpp/sophus2)/.*$
args:
- --ignore-words-list
- "te,tring,crate"
- --skip
- "cpp/thirdparty/*,docs/package-lock.json"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.284
hooks:
- id: ruff
exclude: (thirdparty|cpp/sophus)/.*$
args: [--fix, --exit-non-zero-on-fix]
# TODO: Set ``rev: v1.7.6`` once the release is available.
# See: https://github.com/PyCQA/docformatter/issues/293
- repo: https://github.com/myint/docformatter
# rev: v1.7.6
rev: "eb1df347edd128b30cd3368dddc3aa65edcfac38"
hooks:
- id: docformatter
args: [--in-place, --wrap-summaries=115, --wrap-descriptions=120]