From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH] [pre-commit] Avoid tabs in .pre-commit-config.yaml
Date: Thu, 30 Jul 2026 15:05:34 +0200 [thread overview]
Message-ID: <20260730130534.31866-1-tdevries@suse.de> (raw)
When editing .pre-commit-config.yaml with emacs, I tend to get tab-indented
lines, which causes:
...
$ git commit -a
An error has occurred: InvalidConfigError:
==> File .pre-commit-config.yaml
=====> while scanning for the next token
found character that cannot start any token
in "<unicode string>", line 150, column 1
...
Fix this by adding a "Local Variables" section.
---
.pre-commit-config.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8ff84dae274..3795746c6a9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -147,3 +147,8 @@ repos:
language: unsupported_script
entry: gdb/contrib/check-file-mode.sh
files: *gdb_files
+
+# Local Variables:
+# indent-tabs-mode: nil
+# tab-width: 2
+# End:
base-commit: d1268210b6f6eddd267a4ebe4b7d36b802af628d
--
2.51.0
next reply other threads:[~2026-07-30 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 13:05 Tom de Vries [this message]
2026-08-04 17:36 ` Tom Tromey
2026-08-04 18:45 ` Tom de Vries
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=20260730130534.31866-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