diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2024-06-03 11:46:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 11:46:05 +0200 |
commit | 762c1fdac430e9bb51c83842ea8dba13a6656617 (patch) | |
tree | bc774f6b3c4c39232de61c5564440a96a9baa496 | |
parent | ef886b0a415ecb1fda3338230b270d62e1d086e5 (diff) | |
parent | 48509590fd1d2387059bb73db8dffe0e74b111ef (diff) | |
download | redot-engine-762c1fdac430e9bb51c83842ea8dba13a6656617.tar.gz |
Merge pull request #92697 from Repiteo/ci/multiplat-python-hooks
CI: Make local python hooks multi-platform
-rw-r--r-- | .pre-commit-config.yaml | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9a7714023..12240aef93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,6 @@ +default_language_version: + python: python3 + exclude: | (?x)^( .*thirdparty/.*| @@ -9,7 +12,7 @@ repos: rev: v17.0.6 hooks: - 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] exclude: | (?x)^( @@ -79,14 +82,17 @@ repos: - id: make-rst name: make-rst 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 files: ^(doc/classes|.*/doc_classes)/.*\.xml$ - id: doc-status name: doc-status 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$ - id: eslint @@ -126,8 +132,8 @@ repos: - id: copyright-headers name: copyright-headers language: python - entry: python3 misc/scripts/copyright_headers.py - files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java)$ + entry: python misc/scripts/copyright_headers.py + files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$ exclude: | (?x)^( core/math/bvh_.*\.inc$| @@ -141,19 +147,14 @@ repos: - id: header-guards name: header-guards language: python - entry: python3 misc/scripts/header_guards.py - files: \.(h|hpp)$ - exclude: | - (?x)^( - .*/thread\.h$| - .*/platform_config\.h$| - .*/platform_gl\.$h - ) + entry: python misc/scripts/header_guards.py + files: \.(h|hpp|hh|hxx)$ + exclude: ^.*/(thread|platform_config|platform_gl)\.h$ - id: file-format name: file-format language: python - entry: python3 misc/scripts/file_format.py + entry: python misc/scripts/file_format.py types_or: [text] exclude: | (?x)^( @@ -170,7 +171,7 @@ repos: - id: dotnet-format name: dotnet-format language: python - entry: python3 misc/scripts/dotnet_format.py + entry: python misc/scripts/dotnet_format.py types_or: [c#] # End of upstream Godot pre-commit hooks. |