Yocto Project Documentation
 help / color / mirror / Atom feed
From: Antonin Godard <antonin.godard@bootlin.com>
To: docs@lists.yoctoproject.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 Antonin Godard <antonin.godard@bootlin.com>
Subject: [PATCH 3/3] Add a pre-commit hook to check the glossaries
Date: Thu, 02 Jul 2026 15:59:12 +0200	[thread overview]
Message-ID: <20260702-pre-commit-v1-3-0ebd211b5d5e@bootlin.com> (raw)
In-Reply-To: <20260702-pre-commit-v1-0-0ebd211b5d5e@bootlin.com>

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.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 .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



  parent reply	other threads:[~2026-07-02 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 13:59 [PATCH 0/3] Add pre-commit support Antonin Godard
2026-07-02 13:59 ` [PATCH 1/3] tools/check-glossaries: return 1 in case of failure Antonin Godard
2026-07-03 10:17   ` [docs] " Quentin Schulz
2026-07-02 13:59 ` [PATCH 2/3] tools/check-glossaries: fix default doc path Antonin Godard
2026-07-03 10:22   ` [docs] " Quentin Schulz
2026-07-03 11:34     ` Antonin Godard
2026-07-02 13:59 ` Antonin Godard [this message]
2026-07-03 10:53   ` [docs] [PATCH 3/3] Add a pre-commit hook to check the glossaries Quentin Schulz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260702-pre-commit-v1-3-0ebd211b5d5e@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox