diff options
| author | Michael Biebl <biebl@debian.org> | 2026-07-03 19:53:23 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2026-07-03 19:53:23 +0200 |
| commit | aa308069bebf2d5a3200728caa69a76137c03d8b (patch) | |
| tree | c0ba2281e801c4720a0d8a5e5ee943688234f088 /CONTRIBUTING.md | |
| parent | 0a4b2c29da4ccf259bbcea3298d15abebb94348f (diff) | |
| parent | 537bfce2bda471c92caabd388589230200891509 (diff) | |
Update upstream source from tag 'upstream/1.58_rc1'
Update to upstream version '1.58~rc1' with Debian dir 451489c9234e2b6b7c2f41ca6670287ea3ac3efd
Diffstat (limited to 'CONTRIBUTING.md')
| -rw-r--r-- | CONTRIBUTING.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d755ef74..f5d78f2f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -147,6 +147,28 @@ $ git config --add 'blame.ignoreRevsFile' '.git-blame-ignore-revs' You may integrate clang-formatter in your editor (for [vim](https://github.com/rhysd/vim-clang-format)). +### pre-commit hooks + +A [pre-commit](https://pre-commit.com/) config (`.pre-commit-config.yaml`) is +provided to catch the two issues that most often fail CI's "check-tree" stage +before you push: + +- clang-format on the C/H files you touched, via + `contrib/scripts/nm-code-format-container.sh` so it matches CI's clang-format + version (requires podman); +- `POTFILES.in` consistency (`src/tests/check-potfile-list.py`). + +To enable it, install pre-commit (`pip install pre-commit`, or your distro's +package) and run once in the checkout: + +``` +$ pre-commit install +``` + +The hooks then run on every `git commit`. Use `git commit --no-verify` to skip +them for a work-in-progress commit, or `pre-commit run --all-files` to check the +whole tree. + ### Style As we use clang-format, our style is in parts determined by the tool. |