[PATCH v2 3/3] Add a pre-commit hook to check the glossaries
Antonin Godard <[email protected]> Fri, 03 Jul 2026 13:31:26 +0200
| Newsgroups | org.yoctoproject.lists.docs |
|---|---|
| Message-ID | <[email protected]> |
It is easy to badly order the glossaries or forget to update the list at the beginning of the variables.rst file. Add a pre-commit hook that does it for us, and update the README to mention to enable it. Tested-by: Quentin Schulz <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Signed-off-by: Antonin Godard <[email protected]> --- .pre-commit-config.yaml | 8 ++++++++ documentation/README | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..f2b73a481 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: local + hooks: + - id: check-glossaries + name: Check glossaries alphabetical order + entry: ./documentation/tools/check-glossaries + language: python + pass_filenames: false diff --git a/documentation/README b/documentation/README index 7c4472c73..326930932 100644 --- a/documentation/README +++ b/documentation/README @@ -89,6 +89,16 @@ generated with DocBook. How to build the Yocto Project documentation ============================================ +If possible, install pre-commit hooks to make sure you did not miss any +updates that are run automatically: + + $ pre-commit install + +The pre-commit project can be installed on your host using your package manager, +usually under the name "pre-commit", e.g.: + + $ sudo apt-get install pre-commit + To build the documentation, you need Sphinx and a few other packages, which depend on your host GNU/Linux distribution. Such packages are listed on https://docs.yoctoproject.org/dev/ref-manual/system-requirements.html#required-packages-for-the-build-host -- 2.54.0