doc: Add pre-commit section to Contributor Workflow documentation.
What changed, and why it matters
This commit only adds documentation explaining how contributors can install and use the pre-commit tool for local code checks. It does not change any program code, build scripts, or security-sensitive behavior.
No security action needed; this is a documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a new ‘Local checks with pre-commit’ section to contributor-workflow.md. It describes installing the pre-commit Python package (already part of the dev dependency group) and running ‘pre-commit install/uninstall/clean’. No executable code, configuration files, or CI/security tooling are modified.
Changed components
doc/contribute-to-core-lightning/contributor-workflow.mdInspect captured patch +13 / −0
diff --git a/doc/contribute-to-core-lightning/contributor-workflow.md b/doc/contribute-to-core-lightning/contributor-workflow.md
index 45e50212..d429d83f 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`.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.