A collection of various Git hook scripts for different purposes.
Go to file
The Magician 106cc72726 Fix arithmetic bug 2023-12-07 16:49:27 +00:00
README.md Remove newline 2023-12-07 15:19:24 +00:00
pre-commit.shellcheck Fix arithmetic bug 2023-12-07 16:49:27 +00:00

README.md

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

My version of this hook is based heavily on this Gist: https://gist.github.com/wookietreiber/3bf8621274caafed543fca6a3feab284. Credit to wookietreiber for the original.