4
4
5
5
# CIRCUITPY-CHANGE: CircuitPython-specific.
6
6
7
+ # Note that by default, pre-commit hooks do not look inside submodules.
8
+ # So you don't need to exclude submodules explicitly here.
9
+
7
10
repos :
8
- - repo : https://github.com/pre-commit/pre-commit-hooks
11
+ - repo : https://github.com/pre-commit/pre-commit-hooks
9
12
rev : v5.0.0
10
13
hooks :
11
- - id : check-yaml
12
- - id : end-of-file-fixer
13
- exclude : ' ^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/mimxrt10xx/sdk|ports/raspberrypi/sdk|lib/tinyusb)'
14
- - id : trailing-whitespace
15
- exclude : ' ^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/generate_errors.diff|ports/raspberrypi/sdk|ports/mimxrt10xx/sdk|lib/tinyusb)'
16
- - repo : https://github.com/codespell-project/codespell
14
+ - id : check-yaml
15
+ - id : end-of-file-fixer
16
+ exclude : |
17
+ (?x)^(
18
+ tests/.*\.exp|
19
+ tests/cmdline/.*|
20
+ tests/.*/data/.*
21
+ )
22
+ - id : trailing-whitespace
23
+ exclude : |
24
+ (?x)^(
25
+ tests/.*\.exp|
26
+ tests/cmdline/.*|
27
+ tests/.*/data/.*|
28
+ lib/mbedtls_errors/generate_errors.diff
29
+ )
30
+ - repo : https://github.com/codespell-project/codespell
17
31
rev : v2.2.4
18
32
hooks :
19
- - id : codespell
33
+ - id : codespell
20
34
args : [-w]
21
35
exclude : |
22
36
(?x)^(
@@ -25,38 +39,30 @@ repos:
25
39
tests/unicode/data/utf-8_invalid.txt|
26
40
tests/extmod/data/qr.pgm|
27
41
tests/basics/bytearray_byte_operations.py|
28
- ports/raspberrypi/sdk|
29
42
ports/zephyr-cp/cptools/compat2driver.py
30
43
)
31
- - repo : local
44
+ - repo : local
32
45
hooks :
33
- - id : translations
46
+ - id : translations
34
47
name : Translations
35
48
entry : sh -c "if ! make check-translate; then make translate; fi"
36
49
types : [c]
37
50
pass_filenames : false
38
51
language : system
39
- - id : formatting
52
+ - id : formatting
40
53
name : Formatting
41
- entry : python3 tools/codeformat.py
42
- types : [c]
43
- language : system
44
- exclude : |
45
- (?x)^(
46
- lib/tinyusb|
47
- ports/raspberrypi/sdk
48
- )
49
- - repo : https://github.com/astral-sh/ruff-pre-commit
50
- # Ruff version.
51
- rev : v0.9.4
52
- hooks :
53
- # Run the linter.
54
- - id : ruff
55
- args : [ --fix ]
56
- # Run the formatter.
57
- - id : ruff-format
58
- - repo : https://github.com/tox-dev/pyproject-fmt
59
- rev : " v2.5.0"
60
- hooks :
61
- - id : pyproject-fmt
62
- exclude : ' ^(ports/mimxrt10xx/sdk)'
54
+ entry : python3 tools/codeformat.py -v -c
55
+ language : python
56
+ - repo : https://github.com/astral-sh/ruff-pre-commit
57
+ # Ruff version.
58
+ rev : v0.9.4
59
+ hooks :
60
+ # Run the linter.
61
+ - id : ruff
62
+ args : [ --fix ]
63
+ # Run the formatter.
64
+ - id : ruff-format
65
+ - repo : https://github.com/tox-dev/pyproject-fmt
66
+ rev : " v2.5.0"
67
+ hooks :
68
+ - id : pyproject-fmt
0 commit comments