From e419db48e5e9085ca47a17511d372e210babc5fa Mon Sep 17 00:00:00 2001 From: Muhammad Asif Manzoor Date: Wed, 6 Nov 2024 18:58:11 +0000 Subject: [PATCH] Update README to include instructions for pre-commit --- README | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README b/README index 1c3a8f7c..79d34f03 100644 --- a/README +++ b/README @@ -8,3 +8,19 @@ cmake -G Ninja -B build cmake --build build cmake --install build ``` + +### Pre-Commit +Pre-Commit applies a git hook to the local repository such that linting is checked and applied on every `git commit` action. Install from the root of the repository using: + +```bash +source env/activate +pre-commit install +``` + +If you have already committed before installing the pre-commit hooks, you can run on all files to "catch up": + +```bash +pre-commit run --all-files +``` + +For more information visit [pre-commit](https://pre-commit.com/)