[binutils-gdb] [pre-commit] Avoid tabs in .pre-commit-config.yaml

Tom de Vries via Gdb-cvs <[email protected]> Tue, 4 Aug 2026 18:32:31 +0000 (GMT)
Newsgroups gmane.comp.gdb.cvs
Message-ID <20260804183231.F29584BB3B89__4838.36496002681$1785868362$gmane$org@sourceware.org>
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9435ff696fd3=
18a6733da781e2a29afd753f7bf1

commit 9435ff696fd318a6733da781e2a29afd753f7bf1
Author: Tom de Vries <[email protected]>
Date:   Tue Aug 4 20:32:28 2026 +0200

    [pre-commit] Avoid tabs in .pre-commit-config.yaml
   =20
    When editing .pre-commit-config.yaml with emacs, I tend to get tab-inde=
nted
    lines, which causes:
    ...
    $ git commit -a
    An error has occurred: InvalidConfigError:
    =3D=3D> File .pre-commit-config.yaml
    =3D=3D=3D=3D=3D> while scanning for the next token
    found character that cannot start any token
      in "<unicode string>", line 150, column 1
    ...
   =20
    Fix this by adding a "Local Variables" section.
   =20
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 .pre-commit-config.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fd9223cce2c..3cccec45ef7 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: