From a7504505785186d401d4d6ad2dd9360132d18938 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 29 Jan 2024 11:13:48 -0800 Subject: [PATCH] Add instructions on how to enable pre-commit Signed-off-by: Alex Richardson --- readme.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/readme.adoc b/readme.adoc index 68f2461..3e5de42 100644 --- a/readme.adoc +++ b/readme.adoc @@ -63,3 +63,18 @@ To clean up the generated files, run: ```shell make clean ``` + + +== Enabling pre-commit checks locally +The repository has some basic commit checks set up with https://pre-commit.com/[pre-commit] that will be enforced by the GitHub CI. +To ensure these checks are also run in the local repository while making changes the following command can be run: +[source,shell] +---- +pip3 install pre-commit && pre-commit install +---- + +When enabling additional checks https://pre-commit.com/#plugins[by editing .pre-commit-config.yaml], it is recommended to run to newly added check on all files in the repository. This can be done with the following command: +[source,shell] +---- +pre-commit run --all-files +---- \ No newline at end of file