Skip to content

Commit

Permalink
Merge pull request #65078 from RandomShaper/git_hooks_extend
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Aug 30, 2022
2 parents f58d864 + 8e2d0e1 commit 08eafbd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
###########################

/custom.py
misc/hooks/pre-commit-custom-*

#############################
### Godot generated files ###
Expand Down
5 changes: 5 additions & 0 deletions misc/hooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion misc/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 08eafbd

Please sign in to comment.