CI: Make local python hooks multi-platform

This commit is contained in:
Thaddeus Crews 2024-06-02 13:22:34 -05:00
parent 705b7a0b0b
commit 48509590fd
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
1 changed files with 16 additions and 15 deletions

View File

@ -1,3 +1,6 @@
default_language_version:
python: python3
exclude: | exclude: |
(?x)^( (?x)^(
.*thirdparty/.*| .*thirdparty/.*|
@ -9,7 +12,7 @@ repos:
rev: v17.0.6 rev: v17.0.6
hooks: hooks:
- id: clang-format - id: clang-format
files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java|glsl)$ files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
types_or: [text] types_or: [text]
exclude: | exclude: |
(?x)^( (?x)^(
@ -79,14 +82,17 @@ repos:
- id: make-rst - id: make-rst
name: make-rst name: make-rst
language: python language: python
entry: python3 doc/tools/make_rst.py doc/classes modules platform --dry-run --color entry: python doc/tools/make_rst.py
args: [doc/classes, modules, platform, --dry-run, --color]
pass_filenames: false pass_filenames: false
files: ^(doc/classes|.*/doc_classes)/.*\.xml$ files: ^(doc/classes|.*/doc_classes)/.*\.xml$
- id: doc-status - id: doc-status
name: doc-status name: doc-status
language: python language: python
entry: python3 doc/tools/doc_status.py entry: python doc/tools/doc_status.py
args: [doc/classes, modules/*/doc_classes, platform/*/doc_classes]
pass_filenames: false
files: ^(doc/classes|.*/doc_classes)/.*\.xml$ files: ^(doc/classes|.*/doc_classes)/.*\.xml$
- id: eslint - id: eslint
@ -126,8 +132,8 @@ repos:
- id: copyright-headers - id: copyright-headers
name: copyright-headers name: copyright-headers
language: python language: python
entry: python3 misc/scripts/copyright_headers.py entry: python misc/scripts/copyright_headers.py
files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java)$ files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
exclude: | exclude: |
(?x)^( (?x)^(
core/math/bvh_.*\.inc$| core/math/bvh_.*\.inc$|
@ -141,19 +147,14 @@ repos:
- id: header-guards - id: header-guards
name: header-guards name: header-guards
language: python language: python
entry: python3 misc/scripts/header_guards.py entry: python misc/scripts/header_guards.py
files: \.(h|hpp)$ files: \.(h|hpp|hh|hxx)$
exclude: | exclude: ^.*/(thread|platform_config|platform_gl)\.h$
(?x)^(
.*/thread\.h$|
.*/platform_config\.h$|
.*/platform_gl\.$h
)
- id: file-format - id: file-format
name: file-format name: file-format
language: python language: python
entry: python3 misc/scripts/file_format.py entry: python misc/scripts/file_format.py
types_or: [text] types_or: [text]
exclude: | exclude: |
(?x)^( (?x)^(
@ -170,7 +171,7 @@ repos:
- id: dotnet-format - id: dotnet-format
name: dotnet-format name: dotnet-format
language: python language: python
entry: python3 misc/scripts/dotnet_format.py entry: python misc/scripts/dotnet_format.py
types_or: [c#] types_or: [c#]
# End of upstream Godot pre-commit hooks. # End of upstream Godot pre-commit hooks.