From 77c9d8292cee7d9fe0861eda02a4743d141a926e Mon Sep 17 00:00:00 2001 From: Radonirinaunimi Date: Wed, 18 Sep 2024 22:00:32 +0200 Subject: [PATCH] modify the guideline to refer to pre-commit hooks --- CONTRIBUTING.md | 8 ++++---- docs/maintainers-guide.md | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f24254d5..f7ca6ce3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,10 +2,10 @@ ## Rust -- Before you commit, make sure that your code compiles with `cargo check` and - that it has been formatted properly; `cargo fmt` does that for you. Also - check if your changes introduce any new linter warnings by running `cargo - clippy` +- Before you commit, make sure that you have [pre-commit](https://pre-commit.com/) + installed. This will ensure that the code is formatted correctly and that + it compiles properly. Also, check if your changes introduce any new linter + warnings by running `cargo clippy`. - Make sure to keep `CHANGELOG.md` up-to-date. - Make sure not to use Rust features newer than the specified minimum supported Rust Version (MSRV), which is documented in the [README](README.md). You can diff --git a/docs/maintainers-guide.md b/docs/maintainers-guide.md index 00d857ba..78c650b1 100644 --- a/docs/maintainers-guide.md +++ b/docs/maintainers-guide.md @@ -48,6 +48,7 @@ - `_config.yml`: configuration file for PineAPPL's Github-pages website - `install-capi.sh`: POSIX-compliant shell script to download and install PineAPPL's pre-built CAPI +- `.pre-commit-config.yaml`: pre-commit hooks configuration [cargo-xtask]: https://github.com/matklad/cargo-xtask [release page]: https://github.com/NNPDF/pineappl/releases