Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/9] [gdb] More whitespace fixes
@ 2026-06-18 13:38 Tom de Vries
  2026-06-18 13:38 ` [PATCH 1/9] [gdb] Increase clean range in check-whitespace-pre-commit.py Tom de Vries
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Tom de Vries @ 2026-06-18 13:38 UTC (permalink / raw)
  To: gdb-patches

I came across the trailing-whitespace hook here (
https://github.com/pre-commit/pre-commit-hooks ) and tried it out:
...
  # Out-of-the-box pre-commit hooks.
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
    - id: trailing-whitespace
      files: '^(gdb|gdbserver|gdbsupport)/.*$'
      exclude: 'ChangeLog'
      args: [--chars," \t"]
...

The args field is necessary to stop it removing ^L.

The result is:
...
$ pre-commit run trailing-whitespace --all-files
trim trailing whitespace................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing gdbsupport/Makefile.in
Fixing gdb/config/djgpp/fnchange.lst
Fixing gdb/doc/annotate.texinfo
Fixing gdb/doc/stack_frame.txt
Fixing gdb/exc_request.defs
Fixing gdb/doc/refcard.tex
Fixing gdb/gdb-gdb.gdb.in
Fixing gdb/configure.tgt
...

This made me look again at our homegrown whitespace check, and I found that it
recognizes a set of clean files that doesn't include the above files.

This patch series:
- in check-whitespace-pre-commit.py, adds a todo list of files which are not
  yet clean, enabling complete checking for all other files, and
- reduces the todo list with each following patch.

Tom de Vries (9):
  [gdb] Increase clean range in check-whitespace-pre-commit.py
  [gdb] Fix leftover conflict marker in gdb/config/djgpp/README
  [gdb] Fix new blank line at EOF in a few scripts
  [gdb] Fix new blank line at EOF in a few xml files
  [gdb] Ignore whitespace in imported file gdb/exc_request.defs
  [gdb] Fix trailing whitespace in some files
  [gdb] Ignore trailing whitespace in gdb/gdb-gdb.gdb.in
  [gdb] Fix trailing whitespace in annotate.texinfo
  [gdb] Fix trailing whitespace in refcard.tex

 .pre-commit-config.yaml                    |  1 +
 gdb/.gitattributes                         |  6 +++++
 gdb/config/djgpp/.gitattributes            |  3 +++
 gdb/config/djgpp/djcheck.sh                |  1 -
 gdb/config/djgpp/fnchange.lst              |  2 +-
 gdb/configure.tgt                          |  6 ++---
 gdb/contrib/ari/create-web-ari-in-src.sh   |  1 -
 gdb/contrib/ari/gdb_ari.sh                 |  1 -
 gdb/contrib/check-whitespace-pre-commit.py | 13 +++++++----
 gdb/doc/annotate.texinfo                   |  8 +++----
 gdb/doc/refcard.tex                        | 26 +++++++++++-----------
 gdb/doc/stack_frame.txt                    |  2 +-
 gdb/features/aarch64-pauth.xml             |  1 -
 gdb/features/library-list-aix.dtd          |  1 -
 gdb/features/s390-core64.xml               |  1 -
 gdb/features/sparc/sparc32-cp0.xml         |  1 -
 gdb/features/sparc/sparc32-fpu.xml         |  1 -
 gdb/features/sparc/sparc64-cp0.xml         |  1 -
 gdb/features/sparc/sparc64-fpu.xml         |  1 -
 19 files changed, 41 insertions(+), 36 deletions(-)
 create mode 100644 gdb/config/djgpp/.gitattributes


base-commit: 478b1846cdb82b776c8dcbec20ecd198297cd8ff
-- 
2.51.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-06-18 17:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-18 13:38 [PATCH 0/9] [gdb] More whitespace fixes Tom de Vries
2026-06-18 13:38 ` [PATCH 1/9] [gdb] Increase clean range in check-whitespace-pre-commit.py Tom de Vries
2026-06-18 13:38 ` [PATCH 2/9] [gdb] Fix leftover conflict marker in gdb/config/djgpp/README Tom de Vries
2026-06-18 13:38 ` [PATCH 3/9] [gdb] Fix new blank line at EOF in a few scripts Tom de Vries
2026-06-18 13:38 ` [PATCH 4/9] [gdb] Fix new blank line at EOF in a few xml files Tom de Vries
2026-06-18 13:38 ` [PATCH 5/9] [gdb] Ignore whitespace in imported file gdb/exc_request.defs Tom de Vries
2026-06-18 13:38 ` [PATCH 6/9] [gdb] Fix trailing whitespace in some files Tom de Vries
2026-06-18 13:38 ` [PATCH 7/9] [gdb] Ignore trailing whitespace in gdb/gdb-gdb.gdb.in Tom de Vries
2026-06-18 13:38 ` [PATCH 8/9] [gdb] Fix trailing whitespace in annotate.texinfo Tom de Vries
2026-06-18 13:38 ` [PATCH 9/9] [gdb] Fix trailing whitespace in refcard.tex Tom de Vries
2026-06-18 14:03 ` [PATCH 0/9] [gdb] More whitespace fixes Eli Zaretskii
2026-06-18 15:25   ` Tom de Vries
2026-06-18 17:13     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox