mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Add ability to extend the set of Git pre-commit hooks
(cherry picked from commit 8e2d0e1bb16409ad2e32e6e59432ffafb03c14ee)
This commit is contained in:
parent
866f38a8ae
commit
ba9d7d66fd
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
# Godot auto generated files
|
||||
misc/hooks/pre-commit-custom-*
|
||||
*.gen.*
|
||||
.import/
|
||||
|
||||
|
@ -35,3 +35,8 @@ so they should work out of the box on Linux/macOS.
|
||||
##### black
|
||||
- Python installation: make sure Python is added to the `PATH`
|
||||
- Install `black` - in any console: `pip3 install black`
|
||||
|
||||
## Custom hooks
|
||||
|
||||
The pre-commit hook will run any other script in `.git/hooks` whose filename
|
||||
matches `pre-commit-custom-*`, after the Godot ones.
|
||||
|
@ -13,8 +13,8 @@
|
||||
# pre-commit hooks to be executed. They should be in the same .git/hooks/ folder
|
||||
# as this script. Hooks should return 0 if successful and nonzero to cancel the
|
||||
# commit. They are executed in the order in which they are listed.
|
||||
#HOOKS="pre-commit-compile pre-commit-uncrustify"
|
||||
HOOKS="pre-commit-clang-format pre-commit-black pre-commit-make-rst"
|
||||
HOOKS="$HOOKS $(find $(dirname -- "$0") -type f -name 'pre-commit-custom-*' -exec basename {} \;)"
|
||||
###########################################################
|
||||
# There should be no need to change anything below this line.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user