From c1f9f4aac46032e26a9b4774c9c30f6748a5d9ae Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 27 Jun 2024 09:29:30 -0400 Subject: [PATCH] Add pre-commit instructions (#240) Signed-off-by: Webster Mudge --- CONTRIBUTING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5692abc7..3c35c492 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,16 @@ As a _best practice_, you can prefix your branches with: > [!NOTE] > :fire_extinguisher: A **hotfix** should branch from `main`. It will then be committed to both the `main` and `devel` branches. +## Running pre-commit + +We use [pre-commit](https://pre-commit.com/) to lint and validate submissions. + +Setting up `pre-commit` is straightforward; see the [Installation](https://pre-commit.com/#installation) documentation on the `pre-commit` site for details. + +We highly suggest you install the local `git` hook scripts as well; run `pre-commit install` within the root of the project. + +Lastly, you can run the hooks prior to committing changes (and PR submission) by executing `pre-commit run -a`. + ## Signing your commits Note that we require signed commits inline with [Developer Certificate of Origin](https://developercertificate.org/) best-practices for open source collaboration.