[binutils-gdb] [gdb] Ignore codespell warnings about wrong encodings

Tom de Vries via Gdb-cvs <[email protected]> Thu, 18 Jun 2026 15:53:47 +0000 (GMT)
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cdfda31c0d6b85cfff7fddeabffa570176161548

commit cdfda31c0d6b85cfff7fddeabffa570176161548
Author: Tom de Vries <[email protected]>
Date:   Thu Jun 18 17:53:43 2026 +0200

    [gdb] Ignore codespell warnings about wrong encodings
    
    With "pre-commit run codespell --all-files -v" we get warnings:
    ...
    $ pre-commit run codespell --all-files -v
    codespell................................................................Passed
    - hook id: codespell
    - duration: 1.52s
    
    WARNING: Cannot decode file using encoding "utf-8": \
      gdb/testsuite/gdb.ada/non-ascii-latin-1/pack.adb
    WARNING: Trying next encoding "iso-8859-1"
    ...
    
    Disable these by setting quiet-level in gdb/pyproject.toml.
    
    Approved-By: Tom Tromey <[email protected]>
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34291

Diff:
---
 gdb/pyproject.toml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/pyproject.toml b/gdb/pyproject.toml
index d6b3892ae4f..ba1ec0ddb5f 100644
--- a/gdb/pyproject.toml
+++ b/gdb/pyproject.toml
@@ -149,3 +149,7 @@ uri-ignore-words-list = '*'
 
 # How to ignore blocks of code.
 ignore-multiline-regex = 'codespell:ignore-begin.*?codespell:ignore-end'
+
+# Add 1 (disable warnings about wrong encoding) in addition to the default
+# 2+32 to skip warnings about iso-8859-1 encoded files.
+quiet-level = 35 # 1+2+32