githooks/README.md

15 lines
761 B
Markdown
Raw Normal View History

2023-12-07 15:17:02 +00:00
# githooks
A collection of various Git hook scripts for different purposes.
This file contains a description of what each one is used for.
## pre-commit.shellcheck
This is used in repositories containing Shell code to ensure that commits which would include code that causes `shellcheck` errors can't be committed.
The files which are `shellchecked` are:
- Any files for which the `file` command returns output containing 'shell script'
- Any files which end in the `.sh` file extension
- Any hidden files which begin with either `.bash` or `.zsh`
2023-12-07 15:19:24 +00:00
My version of this hook is based heavily on this Gist: https://gist.github.com/wookietreiber/3bf8621274caafed543fca6a3feab284.
2023-12-07 15:18:50 +00:00
Credit to [wookietreiber](https://gist.github.com/wookietreiber) for the original.