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 21:08:38 +0200 [thread overview]
Message-ID: <a568369c-9ba1-4f87-a39a-459f3df614b0@suse.de> (raw)
In-Reply-To: <87348lj5ak.fsf@tromey.com>
On 9/17/25 20:35, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> I've just tried transferring settings to gdb/pyproject.toml (see patch
> Tom> below), but that didn't work. The docs say it's supposed to work
> Tom> though, so some debugging is needed.
>
> Thanks for trying it. I guess maybe file an upstream bug report?
I understand it now. Using pyproject.toml works, provided you're
running the command from the same directory.
So, in this case the pyproject.toml file is read, which prevents
line-length warnings:
...
$ ( cd gdb; tclint testsuite/lib/gdb.exp ) | grep -c line-length
0
...
And in this case (which is what I do usually) not:
...
$ tclint gdb/testsuite/lib/gdb.exp | grep -c line-length
17
...
I think that also might make it difficult to use tclint from pre-commit.
> Anyway let's just go with your original patch. We can always move the
> config if/when tclint is fixed.
>
Thanks, I'll push it.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom> +# Used by tclfmt. Doesn't support mixed TAB and spaces style we use. See
> Tom> +# this tclint issue ( https://github.com/nmoroze/tclint/issues/109 ).
> Tom> +indent = 4
>
> Probably not the best spot to bring it up, but FWIW I never liked the 4
> indent step for Tcl. I always used 2 in my own code. The reason is
> that with 4 you end up with:
>
> if {something complicated
> && requiring multiple lines} {
> then the code is indented just like the condition
> }
>
> as opposed to
>
> if {something complicated
> && requiring multiple lines} {
> then the code is outdented just a little
> }
I got used to it, but I don't care too much one way or the other. As
long as I can use emacs with auto-indent, I'm fine :)
FWIW, atm we don't use tclfmt, but I thought it'd be useful to at least
document current practice.
Thanks,
- Tom
next prev parent reply other threads:[~2025-09-17 19:09 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
2025-09-17 18:35 ` Tom Tromey
2025-09-17 19:08 ` Tom de Vries [this message]
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=a568369c-9ba1-4f87-a39a-459f3df614b0@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