From 2bc67c37c49f1e6ed3a20fd4c55e57f9645dd78e Mon Sep 17 00:00:00 2001 From: Se7enZ Date: Wed, 10 Dec 2025 13:34:26 +0100 Subject: [PATCH] doc: Add pre-commit section to Contributor Workflow documentation. --- .../contributor-workflow.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/contribute-to-core-lightning/contributor-workflow.md b/doc/contribute-to-core-lightning/contributor-workflow.md index 45e50212c..d429d83f7 100644 --- a/doc/contribute-to-core-lightning/contributor-workflow.md +++ b/doc/contribute-to-core-lightning/contributor-workflow.md @@ -61,6 +61,19 @@ uv build contrib/pyln-client/ uv build contrib/pyln-proto/ ``` +## Local checks with pre-commit + +You can avoid common mistakes, speed up your development workflow and avoid wasteful CI runs by opting in to the local code checks managed by [pre-commit](https://pre-commit.com). The `pre-commit` Python package is part of the `dev` group and should be installed along with the other packages using `pip` or `uv` when [installing from source](https://docs.corelightning.org/docs/installation#installing-from-source). Activate it on your local development environment from the root of your Core Lightning working directory with: +```shell +pre-commit install +``` + +You can disable and remove it with: +```shell +pre-commit uninstall +pre-commit clean +``` + ## Making BOLT Modifications All of code for marshalling/unmarshalling BOLT protocol messages is generated directly from the spec. These are pegged to the BOLTVERSION, as specified in `Makefile`.