-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
138 lines (120 loc) · 3.53 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# install:
# pip3 install pre-commit
# sudo apt install cppcheck build-essential
# run:
# pre-commit run -a
# update deps:
# pre-commit autoupdate
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs
- id: detect-private-key
- id: mixed-line-ending
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: fix-byte-order-marker
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-use-type-annotations
- id: python-no-log-warn
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: ["--py38-plus"]
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
# NOTE: entries are copy of .flake8-config-file -> for auto-install
### Bugs
- flake8-bugbear
- flake8-secure-coding-standard
- flake8-bandit
- flake8-builtins
### Clean Code
- flake8-comprehensions
- flake8-simplify
- flake8-eradicate
### Limitations
- flake8-blind-except
- flake8-logging-format
- flake8-print
### Documentation
- flake8-comments
# - flake8-docstrings
# - flake8-rst-docstrings
### Test-Improvements
- flake8-assertive
### Load Config from …
- Flake8-pyproject
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.3.7'
hooks:
- id: ruff
# args: ["--fix", "--exit-non-zero-on-fix"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
args: ["--disable", "MD013"] # ignore line length
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
hooks:
- id: validate-pyproject
- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
hooks:
- id: codespell
exclude: \.(sch|brd|lbr)$
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v18.1.3'
hooks:
- id: clang-format
types_or: [c++, c]
# cpp-check comes last! fails if uninstalled
- repo: https://github.com/pocc/pre-commit-hooks
rev: "v1.3.5"
hooks:
- id: cppcheck
args:
- "--enable=all"
- "--std=c99"
- "--platform=unix32"
- "--verbose"
- "-q"
- "--max-ctu-depth=10"
- "-isoftware/firmware/_cgt233/"
- "-isoftware/firmware/_pssp57g/"
- "--suppress=unusedFunction"
- "--suppress=variableScope"
- "--suppress=unreadVariable"
- "--suppress=missingInclude"
- "--suppress=unmatchedSuppression"
# - id: clang-tidy
# args: [ "-checks=bugprone-,cert-,performance-,portability-"]
# TODO: add more c-linters, but there are to many false positives