From b75d9e5c59753175dbc950f88607d7552120daea Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 3 Jun 2021 14:17:10 +0200 Subject: [PATCH] Add note about pre-commit --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9796754dd..3a2aa8da7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,3 +31,18 @@ For bug reports, please provide the following details: Please wrap all code and error messages in [markdown code fences](https://help.github.com/articles/creating-and-highlighting-code-blocks/). + +### Contributing code + +To make sure that you don't accidentally commit code that does not follow the coding style, you can +install a [`pre-commit`](https://pre-commit.com/) hook that will check that everything is in order: + +```bash +pre-commit install +``` + +You can also run it anytime using: + +```bash +pre-commit run --all-files +```