A collection of various Git hook scripts for different purposes.
Go to file
The Magician e11ff092a3 Add pre-commit.shellcheck hook 2023-12-07 15:17:02 +00:00
README.md Add pre-commit.shellcheck hook 2023-12-07 15:17:02 +00:00
pre-commit.shellcheck Add pre-commit.shellcheck hook 2023-12-07 15:17:02 +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]https://gist.github.com/wookietreiber for the original.