From 9e621e33fb7146328d713c84687518093a1b65c3 Mon Sep 17 00:00:00 2001 From: Vraj Prajapati Date: Wed, 3 Jul 2024 11:15:52 -0500 Subject: [PATCH] =?UTF-8?q?Added=20Precommit=20installation=20instructions?= =?UTF-8?q?=20to=20Docs=20and=20precommit-insta=E2=80=A6=20(#97)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added Precommit installation instructions to Docs and precommit-install CMake target * Removed pre-commit CMake target * Pull from main to update build task --- docs/src/build.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/src/build.md b/docs/src/build.md index 45df9341c..ad01cff7d 100644 --- a/docs/src/build.md +++ b/docs/src/build.md @@ -49,6 +49,22 @@ source env/activate cmake --build build -- clang-tidy ``` +### 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/) + ## Docs ```bash