diff --git a/doc/dev/setup_env_dev.md b/doc/dev/setup_env_dev.md index 002b58f1dc4ed5e86eaafadc48ae7c5b418c5900..192cbb251f8efef49494008081b823daeaa8c801 100644 --- a/doc/dev/setup_env_dev.md +++ b/doc/dev/setup_env_dev.md @@ -82,6 +82,20 @@ If all the tests are successful, the command ends like this: Done in 43.80s. ``` +### Pre-commit hooks +We are using [`pre-commit`](https://pre-commit.com/) tool to perform checks on staged changes before committing. +We are using it for `fmt` formatting, `clippy` linter, `cargo check` and `gitlab-ci` linting. + +To install the `pre-commit`, run: +```bash +sudo apt install pre-commit +``` + +Install the hooks: +```bash +duniter> pre-commit install +``` + ### Configure your IDE Personally, I use VsCodium/VsCode, so I give the configuration for this IDE.