Skip to content

Git Hooks

Pieter edited this page May 22, 2024 · 1 revision

For a general explanation on git hooks see here.

We use git hooks for the following purposes:

  • To self-install any updates to the git hooks
  • To format files that are changed in a commit along the scalafmt rules.

Updating or installing git hooks

You can install the git hooks for this repository with ./util/gitconfig.sh in a terminal or Git Bash. This causes the scripts in util/githooks to be run at the listed event. Currenty only pre-commit does anything interesting.

Formatting files

It's polite not to introduce formatting changes in commits - this keeps diffs nice to read. For that reason we run formatting automatically on the list of files that is changed in a commit just before actually doing the commit. Please do not manually run formatting on files that are not touched by your commit.

If something goes wrong: we do not assign much priority to the formatting being correct, so when in doubt we do not mind commits with --no-verify.

Clone this wiki locally