From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [pre-commit] Add tclint hook
Date: Wed, 17 Sep 2025 20:15:56 +0200 [thread overview]
Message-ID: <5251058c-de2a-450a-bbbf-e420ae941047@suse.de> (raw)
In-Reply-To: <87frcljdax.fsf@tromey.com>
On 9/17/25 17:42, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> Add a pre-commit hook that enables tclint [1] (a Tcl linter) for the gdb
> Tom> testsuite.
>
> Tom> The pre-commit hook doesn't reference the official url, because that one
> Tom> doesn't have pre-commit support yet [2].
>
> My first reaction was to say we should wait but after reflecting a bit,
> I think it's probably better to just go ahead and then switch when
> tclint upstream catches up.
>
> Tom> Also add a tclint configuration file gdb/testsuite/tclint.toml.
>
> How about using pyproject.toml so we can have (nearly) all this kind of
> config in one spot?
Hi Tom,
thanks for the review, and for supporting the idea.
I've just tried transferring settings to gdb/pyproject.toml (see patch
below), but that didn't work. The docs say it's supposed to work
though, so some debugging is needed.
Thanks,
- Tom
diff --git a/gdb/pyproject.toml b/gdb/pyproject.toml
index 4469f1cd61d..d271939df5c 100644
--- a/gdb/pyproject.toml
+++ b/gdb/pyproject.toml
@@ -3,3 +3,57 @@ include = "\\.py(\\.in)?$"
[tool.pyright]
typeCheckingMode = "strict"
+
+[tool.tclint]
+exclude = [
+"gdb/testsuite/boards",
+"gdb/testsuite/config",
+"gdb/testsuite/lib",
+"gdb/testsuite/gdb.ada",
+"gdb/testsuite/gdb.arch",
+"gdb/testsuite/gdb.asm",
+"gdb/testsuite/gdb.base",
+"gdb/testsuite/gdb.btrace",
+"gdb/testsuite/gdb.compile",
+"gdb/testsuite/gdb.cp",
+"gdb/testsuite/gdb.ctf",
+"gdb/testsuite/gdb.dap",
+"gdb/testsuite/gdb.debuginfod",
+"gdb/testsuite/gdb.disasm",
+"gdb/testsuite/gdb.dlang",
+"gdb/testsuite/gdb.dwarf2",
+"gdb/testsuite/gdb.fortran",
+"gdb/testsuite/gdb.gdb",
+"gdb/testsuite/gdb.go",
+"gdb/testsuite/gdb.guile",
+"gdb/testsuite/gdb.linespec",
+"gdb/testsuite/gdb.mi",
+"gdb/testsuite/gdb.multi",
+"gdb/testsuite/gdb.opencl",
+"gdb/testsuite/gdb.perf",
+"gdb/testsuite/gdb.python",
+"gdb/testsuite/gdb.reverse",
+"gdb/testsuite/gdb.rocm",
+"gdb/testsuite/gdb.server",
+"gdb/testsuite/gdb.stabs",
+"gdb/testsuite/gdb.threads",
+"gdb/testsuite/gdb.trace",
+]
+# A maximum line length of 80 is current policy, but hasn't been too
strictly
+# enforced. It's the most frequent and least harmful violation.
+# Ignore this for now.
+ignore = ["line-length"]
+extensions = ["exp", "tcl"]
+
+[tool.tclint.style]
+# Used by tclfmt. Doesn't support mixed TAB and spaces style we use. See
+# this tclint issue ( https://github.com/nmoroze/tclint/issues/109 ).
+indent = 4
+# Used by both tclint and tclfmt. Current policy is 80.
+line-length = 80
+# Used by tclfmt.
+max-blank-lines = 1
+# Used by tclfmt. False conflicts with emacs tcl mode.
+indent-namespace-eval = true
+# Used by tclfmt.
+spaces-in-braces = false
next prev parent reply other threads:[~2025-09-17 18:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 8:41 Tom de Vries
2025-09-17 15:42 ` Tom Tromey
2025-09-17 18:15 ` Tom de Vries [this message]
2025-09-17 18:35 ` Tom Tromey
2025-09-17 19:08 ` Tom de Vries
2025-09-17 19:43 ` Tom de Vries
2025-09-18 0:22 ` Tom Tromey
2025-09-19 7:14 ` Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5251058c-de2a-450a-bbbf-e420ae941047@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox