From 00e52d975c18f58c7f26ceacbc010973ebbd30a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 21 May 2024 15:58:47 +0200 Subject: [PATCH] Pre-commit: Allow adding downstream hooks without (less) risk of conflicts Apply Godot copyright header only on the platform folders that we maintain upstream. This lets downstream forks decide what to do with their potential proprietary platforms. --- .pre-commit-config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a0e919c4761..a8bdcd5fa192 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -146,6 +146,7 @@ repos: exclude: | (?x)^( core/math/bvh_.*\.inc$| + platform/(?!android|ios|linuxbsd|macos|web|windows)\w+/.*| platform/android/java/lib/src/com/.*| platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView\.java$| platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper\.java$| @@ -186,3 +187,15 @@ repos: language: python entry: python3 misc/scripts/dotnet_format.py types_or: [c#] + +# End of upstream Godot pre-commit hooks. +# +# Keep this separation to let downstream forks add their own hooks to this file, +# without running into merge conflicts when rebasing on latest upstream. +# +# Start of downstream pre-commit hooks. +# +# This is still the "repo: local" scope, so new local hooks can be defined directly at this indentation: +# - id: new-local-hook +# To add external repo hooks, bring the indentation back to: +# - repo: my-remote-hook