forked from blackmagic-debug/blackmagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
21 lines (18 loc) · 1000 Bytes
/
.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
exclude: '^upgrade/|^scripts/' # don't run hooks on scripts/ and upgrade/
repos:
- repo: https://github.com/ssciwr/clang-format-hook
rev: v16.0.2
hooks:
- id: clang-format
# entries here override, not extend, upstream's configuration
args: [-Werror, -style=file, -i] # change formatting warnings to errors, and edit in-place
types_or: [c++, c] # override default file types to only C and CPP files
- repo: https://github.com/perigoso/pre-commit-hooks
rev: v0.3.1
hooks:
- id: check-hex-case
args: [--lower-digits] # edit-in-place, hex number digits to lower case (defaults to upper case), i.e. 0x55aa
- id: check-accidental-assignment
args: [--strict, --skip-keywords, DO_PRAGMA, --] # strict, check in all parentheses found, skip check in DO_PRAGMA macro
# FIXME: Known assignment in find_debuggers, needs large refactoring, ignore file temporarily so we get a working check for the rest of the code base
exclude: '^src/platforms/hosted/bmp_serial.c'