Skip to content

Instantly share code, notes, and snippets.

@woneill
Created November 14, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woneill/66eab4a3f18e0de06ad18bea673f2964 to your computer and use it in GitHub Desktop.
Save woneill/66eab4a3f18e0de06ad18bea673f2964 to your computer and use it in GitHub Desktop.

pre-commit hooks

The pre-commit framework is used to ensure consistency . It is configured via .pre-commit-config.yaml to run the checks prior to allowing a git commit to continue.

Installation

On MacOSX install the pre-commit package

brew install pre-commit

For other operating systems check the official documentation

Install the pre-commit hook

pre-commit install

After pre-commit hook has been installed you can run it manually on all files in the repository to confirm that it works

pre-commit run -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment