Skip to content

Commit 4850959

Browse files
committed
CI: Make local python hooks multi-platform
1 parent 705b7a0 commit 4850959

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.pre-commit-config.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
default_language_version:
2+
python: python3
3+
14
exclude: |
25
(?x)^(
36
.*thirdparty/.*|
@@ -9,7 +12,7 @@ repos:
912
rev: v17.0.6
1013
hooks:
1114
- id: clang-format
12-
files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java|glsl)$
15+
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
1316
types_or: [text]
1417
exclude: |
1518
(?x)^(
@@ -79,14 +82,17 @@ repos:
7982
- id: make-rst
8083
name: make-rst
8184
language: python
82-
entry: python3 doc/tools/make_rst.py doc/classes modules platform --dry-run --color
85+
entry: python doc/tools/make_rst.py
86+
args: [doc/classes, modules, platform, --dry-run, --color]
8387
pass_filenames: false
8488
files: ^(doc/classes|.*/doc_classes)/.*\.xml$
8589

8690
- id: doc-status
8791
name: doc-status
8892
language: python
89-
entry: python3 doc/tools/doc_status.py
93+
entry: python doc/tools/doc_status.py
94+
args: [doc/classes, modules/*/doc_classes, platform/*/doc_classes]
95+
pass_filenames: false
9096
files: ^(doc/classes|.*/doc_classes)/.*\.xml$
9197

9298
- id: eslint
@@ -126,8 +132,8 @@ repos:
126132
- id: copyright-headers
127133
name: copyright-headers
128134
language: python
129-
entry: python3 misc/scripts/copyright_headers.py
130-
files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java)$
135+
entry: python misc/scripts/copyright_headers.py
136+
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
131137
exclude: |
132138
(?x)^(
133139
core/math/bvh_.*\.inc$|
@@ -141,19 +147,14 @@ repos:
141147
- id: header-guards
142148
name: header-guards
143149
language: python
144-
entry: python3 misc/scripts/header_guards.py
145-
files: \.(h|hpp)$
146-
exclude: |
147-
(?x)^(
148-
.*/thread\.h$|
149-
.*/platform_config\.h$|
150-
.*/platform_gl\.$h
151-
)
150+
entry: python misc/scripts/header_guards.py
151+
files: \.(h|hpp|hh|hxx)$
152+
exclude: ^.*/(thread|platform_config|platform_gl)\.h$
152153

153154
- id: file-format
154155
name: file-format
155156
language: python
156-
entry: python3 misc/scripts/file_format.py
157+
entry: python misc/scripts/file_format.py
157158
types_or: [text]
158159
exclude: |
159160
(?x)^(
@@ -170,7 +171,7 @@ repos:
170171
- id: dotnet-format
171172
name: dotnet-format
172173
language: python
173-
entry: python3 misc/scripts/dotnet_format.py
174+
entry: python misc/scripts/dotnet_format.py
174175
types_or: [c#]
175176

176177
# End of upstream Godot pre-commit hooks.

0 commit comments

Comments
 (0)