Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [pre-commit] Run yamllint in strict mode
Date: Thu, 27 Aug 2026 08:56:40 +0200	[thread overview]
Message-ID: <20260827065640.935040-1-tdevries@suse.de> (raw)

While working on a patch series, I ran pre-commit in verbose mode and found
that yamllint showed a warning.

By default, yamllint runs in non-strict mode, so it doesn't return non-zero if
there are only warnings [1].

Consequently, the hook won't fail, and the warning will be hidden.

Fix this by running yamllint in strict mode.

[1] https://yamllint.readthedocs.io/en/stable/configuration.html#errors-and-warnings
---
 .pre-commit-config.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 53e4c5033c1..24d8ccad604 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -108,6 +108,11 @@ repos:
     hooks:
       - id: yamllint
         files: '^\.pre-commit-config.yaml$'
+        # By default warnings don't cause yamllint to return non-zero, so they:
+        # - don't cause the hook to fail, and
+        # - are hidden unless pre-commit runs in verbose mode.
+        # Enable strict mode to make sure we see and fix warnings.
+        args: [--strict]
 
   # Local hooks.
   - repo: local

base-commit: 4714939342d0bf5eac37455c13941a89013d004f
-- 
2.51.0


                 reply	other threads:[~2026-08-27  6:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260827065640.935040-1-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /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