* [PATCH] [pre-commit] Avoid tabs in .pre-commit-config.yaml
@ 2026-07-30 13:05 Tom de Vries
2026-08-04 17:36 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2026-07-30 13:05 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [pre-commit] Avoid tabs in .pre-commit-config.yaml
2026-07-30 13:05 [PATCH] [pre-commit] Avoid tabs in .pre-commit-config.yaml Tom de Vries
@ 2026-08-04 17:36 ` Tom Tromey
2026-08-04 18:45 ` Tom de Vries
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2026-08-04 17:36 UTC (permalink / raw)
To: Tom de Vries; +Cc: gdb-patches
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> When editing .pre-commit-config.yaml with emacs, I tend to get tab-indented
Tom> lines, which causes:
FWIW I installed yaml-mode, which automatically sets indent-tabs-mode to
nil.
But this patch is fine, not everyone will have yaml-mode.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [pre-commit] Avoid tabs in .pre-commit-config.yaml
2026-08-04 17:36 ` Tom Tromey
@ 2026-08-04 18:45 ` Tom de Vries
0 siblings, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2026-08-04 18:45 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 8/4/26 7:36 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> When editing .pre-commit-config.yaml with emacs, I tend to get tab-indented
> Tom> lines, which causes:
>
> FWIW I installed yaml-mode, which automatically sets indent-tabs-mode to
> nil.
>
> But this patch is fine, not everyone will have yaml-mode.
>
Thanks for the review, committed.
FWIW, I rely heavily on emacs, but I tend to use a fairly basic
configuration. I wouldn't mind though if yaml-mode gets installed by
default.
Thanks,
- Tom
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-04 18:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-30 13:05 [PATCH] [pre-commit] Avoid tabs in .pre-commit-config.yaml Tom de Vries
2026-08-04 17:36 ` Tom Tromey
2026-08-04 18:45 ` Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox