From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4R/9NCDjr2kMayEAWB0awg (envelope-from ) for ; Tue, 10 Mar 2026 05:23:44 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=QXwyxU9n; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=MMEpb3nX; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=QXwyxU9n; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=MMEpb3nX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D1F251E08D; Tue, 10 Mar 2026 05:23:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D57F21E08D for ; Tue, 10 Mar 2026 05:23:43 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 60FFB4B9DB42 for ; Tue, 10 Mar 2026 09:23:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60FFB4B9DB42 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=QXwyxU9n; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=MMEpb3nX; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=QXwyxU9n; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=MMEpb3nX Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 2804A4BA23F9 for ; Tue, 10 Mar 2026 09:19:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2804A4BA23F9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2804A4BA23F9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773134347; cv=none; b=aSmVRj2+6gbsq8xWEqVuA7bNiIstC8oP7ySUJDdK4kISKQ85TQio7HFZYr5cTE821eAkZod4mh5n3HyN3d8vBR5Df0cs7T8+C5piCKAxpePpD7SVr78eL/Tc5VniAFbA6XcCVcotqVrvwLjZm5N/qmhbncHVK6ayl55i9RhB0xI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773134347; c=relaxed/simple; bh=+rauQVzAFRnagfqyPDzyA3Oji8BfhSkIDKoMILMs5gQ=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=h7f4p+0J3h23Fwsky27UZzqwn/mC9mAze/6O1hKPy/oVhYbv2QKmGqy1Wwgxs7cfdd4sCbN2wO9lM3HO8hlKv6e/2gwq1ChmlhOMouj8LD9KbmuYOOFaNAfqL97qdy6jTG/h6t4rGwa1aKMZHW+rLSpvlwUWI/qQUkERXfK+tRs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2804A4BA23F9 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DEB2A5BCD0 for ; Tue, 10 Mar 2026 09:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773134323; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FhzKHgUprH+cBZRMrKfwOItlFNUgZvIhUpjTaH0K9Os=; b=QXwyxU9npFBgfRFkE5zyAUXakPWV1gOEUq9KR5PjlAx1l0fmz8WH/A2kvNwqfGVpe1ZjaP VmZFUA0EnvVmWcAKph5icI7dh9eWwoCM1Avob+7OgU+cAxTWU3of+vvZlFwnX1caJMLbza 4p099td1EekE4646XYna+tU5cO/ZRAs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773134323; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FhzKHgUprH+cBZRMrKfwOItlFNUgZvIhUpjTaH0K9Os=; b=MMEpb3nXCFrg2OTLGGHJ2ePn6zRTveSlS7EdmC7S75jQVz+i4ju3Zu/iQ7VVfO8bbgBft1 bkX4M1Fl2u6rs8DQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=QXwyxU9n; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=MMEpb3nX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773134323; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FhzKHgUprH+cBZRMrKfwOItlFNUgZvIhUpjTaH0K9Os=; b=QXwyxU9npFBgfRFkE5zyAUXakPWV1gOEUq9KR5PjlAx1l0fmz8WH/A2kvNwqfGVpe1ZjaP VmZFUA0EnvVmWcAKph5icI7dh9eWwoCM1Avob+7OgU+cAxTWU3of+vvZlFwnX1caJMLbza 4p099td1EekE4646XYna+tU5cO/ZRAs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773134323; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FhzKHgUprH+cBZRMrKfwOItlFNUgZvIhUpjTaH0K9Os=; b=MMEpb3nXCFrg2OTLGGHJ2ePn6zRTveSlS7EdmC7S75jQVz+i4ju3Zu/iQ7VVfO8bbgBft1 bkX4M1Fl2u6rs8DQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C6C243F3A2 for ; Tue, 10 Mar 2026 09:18:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id cBfgLvPhr2k2SAAAD6G6ig (envelope-from ) for ; Tue, 10 Mar 2026 09:18:43 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 2/7] [pre-commit] Move gdb/contrib/setup.cfg to gdb/pyproject.toml Date: Tue, 10 Mar 2026 10:18:38 +0100 Message-ID: <20260310091843.3214063-3-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260310091843.3214063-1-tdevries@suse.de> References: <20260310091843.3214063-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from,2a07:de40:b281:106:10:150:64:167:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid] X-Rspamd-Queue-Id: DEB2A5BCD0 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org The codespell settings are currently in gdb/contrib/setup.cfg. There's a goal to move settings of Python tools used for gdb to gdb/pyproject.toml. Do so, and update the args entries in .pre-commit-config.yaml: ... - args: [--config, gdb/contrib/setup.cfg] + args: [--toml, gdb/pyproject.toml] ... It's necessary to point codespell as used in pre-commit to the pyproject.toml file, because: - pre-commit uses codespell with the repository root as working directory - codespell currently only supports discovery of configuration files in the working directory. There's an issue open to support hierarchical pyproject.toml files [1]. Likewise, it's necessary to point codespell on the CLI to the pyproject.toml file: ... $ codespell --toml gdb/pyproject.toml ... Now that the codespell settings are in gdb/pyproject.toml, codespell will automatically discover it when running codespell in the gdb directory. However, that's not useful, because the paths in gdb/pyproject.toml are relative to the repository root. Hopefully, that will be fixed once codespell supports hierarchical toml files. In the mean time, we could fix this by moving the settings to a pyproject.toml file in the repository root. But we have been avoiding this sofar (to keep project-related things out of the repository root as much as possible), so we continue having this pre-existing issue. [1] https://github.com/codespell-project/codespell/issues/3737 --- .pre-commit-config.yaml | 4 ++-- gdb/contrib/setup.cfg | 13 ------------- gdb/pyproject.toml | 14 ++++++++++++++ pyproject.toml | 0 4 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 gdb/contrib/setup.cfg create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dec172379e9..679d089aa94 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,11 +72,11 @@ repos: hooks: - id: codespell files: '^(gdbsupport|gdbserver|gdb/(dwarf2|tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests|cli|testsuite/gdb.(ctf|dap|debuginfod|gdb|go|guile|mi|modula2|objc|opencl|opt|pascal|perf|replay|reverse|rocm|server|stabs|testsuite|tui|xml)))/' - args: [--config, gdb/contrib/setup.cfg] + args: [--toml, gdb/pyproject.toml] - id: codespell name: codespell-log entry: gdb/contrib/codespell-log.sh - args: [--config, gdb/contrib/setup.cfg] + args: [--toml, gdb/pyproject.toml] always_run: true verbose: true stages: [commit-msg] diff --git a/gdb/contrib/setup.cfg b/gdb/contrib/setup.cfg deleted file mode 100644 index 654eca6b768..00000000000 --- a/gdb/contrib/setup.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[codespell] - -# Skip ChangeLogs and generated files. -skip = */ChangeLog*,*/configure,gdbsupport/Makefile.in,*.dat,*.eps,gdb/features/*.c,gdb/ada-casefold.h,gdb/copying.c,gdb/gdbarch-gen.h,gdb/gdbarch-gen.c,gdb/target-delegates-gen.c - -ignore-words = gdb/contrib/codespell-ignore-words.txt -dictionary = gdb/contrib/codespell-dictionary.txt,- - -# Ignore all URLs. -uri-ignore-words-list = * - -# How to ignore blocks of code. -ignore-multiline-regex = codespell:ignore-begin.*?codespell:ignore-end diff --git a/gdb/pyproject.toml b/gdb/pyproject.toml index 2dc00f4abb2..2b66f47b5a0 100644 --- a/gdb/pyproject.toml +++ b/gdb/pyproject.toml @@ -38,3 +38,17 @@ indent-namespace-eval = true # Used by tclfmt. spaces-in-braces = false + +[tool.codespell] + +# Skip ChangeLogs and generated files. +skip = '*/ChangeLog*,*/configure,gdbsupport/Makefile.in,*.dat,*.eps,gdb/features/*.c,gdb/ada-casefold.h,gdb/copying.c,gdb/gdbarch-gen.h,gdb/gdbarch-gen.c,gdb/target-delegates-gen.c' + +ignore-words = 'gdb/contrib/codespell-ignore-words.txt' +dictionary = 'gdb/contrib/codespell-dictionary.txt,-' + +# Ignore all URLs. +uri-ignore-words-list = '*' + +# How to ignore blocks of code. +ignore-multiline-regex = 'codespell:ignore-begin.*?codespell:ignore-end' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000000..e69de29bb2d -- 2.51.0