* [PATCH] [gdb] Add .shellcheckrc
@ 2026-08-31 8:22 Tom de Vries
2026-08-31 20:05 ` Simon Marchi
2026-09-01 16:25 ` Tom Tromey
0 siblings, 2 replies; 6+ messages in thread
From: Tom de Vries @ 2026-08-31 8:22 UTC (permalink / raw)
To: gdb-patches
I came across an inconsistency between shellcheck versions 0.10.0 and 0.11.0.
Version v0.11.0 disables SC2002 (Useless use of cat) by default.
Fix this inconsistency by enabling it by default in gdb/.shellcheckrc.
Add symlinks at {gdbserver,gdbsupport}/.shellcheckrc.
These symlinks will be expanded to regular files in the tarballs as produced
by src-release.sh due to using "tar -h".
---
gdb/.shellcheckrc | 3 +++
gdbserver/.shellcheckrc | 1 +
gdbsupport/.shellcheckrc | 1 +
3 files changed, 5 insertions(+)
create mode 100644 gdb/.shellcheckrc
create mode 120000 gdbserver/.shellcheckrc
create mode 120000 gdbsupport/.shellcheckrc
diff --git a/gdb/.shellcheckrc b/gdb/.shellcheckrc
new file mode 100644
index 00000000000..91b66edaf7a
--- /dev/null
+++ b/gdb/.shellcheckrc
@@ -0,0 +1,3 @@
+# SC2002 was disabled by default in 0.11.0. Turn it on for
+# compatibility with 0.10.0.
+enable=useless-use-of-cat
diff --git a/gdbserver/.shellcheckrc b/gdbserver/.shellcheckrc
new file mode 120000
index 00000000000..2a49a004d21
--- /dev/null
+++ b/gdbserver/.shellcheckrc
@@ -0,0 +1 @@
+../gdb/.shellcheckrc
\ No newline at end of file
diff --git a/gdbsupport/.shellcheckrc b/gdbsupport/.shellcheckrc
new file mode 120000
index 00000000000..2a49a004d21
--- /dev/null
+++ b/gdbsupport/.shellcheckrc
@@ -0,0 +1 @@
+../gdb/.shellcheckrc
\ No newline at end of file
base-commit: bcdc54fb7a34a312777fa814e065b2cc01424e0a
--
2.51.0
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] [gdb] Add .shellcheckrc
2026-08-31 8:22 [PATCH] [gdb] Add .shellcheckrc Tom de Vries
@ 2026-08-31 20:05 ` Simon Marchi
2026-08-31 23:04 ` Tom de Vries
2026-09-01 16:25 ` Tom Tromey
1 sibling, 1 reply; 6+ messages in thread
From: Simon Marchi @ 2026-08-31 20:05 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 8/31/26 4:22 AM, Tom de Vries wrote:
> I came across an inconsistency between shellcheck versions 0.10.0 and 0.11.0.
>
> Version v0.11.0 disables SC2002 (Useless use of cat) by default.
>
> Fix this inconsistency by enabling it by default in gdb/.shellcheckrc.
>
> Add symlinks at {gdbserver,gdbsupport}/.shellcheckrc.
>
> These symlinks will be expanded to regular files in the tarballs as produced
> by src-release.sh due to using "tar -h".
Approved-By: Simon Marchi <simon.marchi@efficios.com>
I did not know there were optionl / disabled by default rules.
https://github.com/koalaman/shellcheck/wiki/Optional
I think we should look at enabling some of them.
Simon
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] [gdb] Add .shellcheckrc
2026-08-31 20:05 ` Simon Marchi
@ 2026-08-31 23:04 ` Tom de Vries
0 siblings, 0 replies; 6+ messages in thread
From: Tom de Vries @ 2026-08-31 23:04 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
On 8/31/26 10:05 PM, Simon Marchi wrote:
> On 8/31/26 4:22 AM, Tom de Vries wrote:
>> I came across an inconsistency between shellcheck versions 0.10.0 and 0.11.0.
>>
>> Version v0.11.0 disables SC2002 (Useless use of cat) by default.
>>
>> Fix this inconsistency by enabling it by default in gdb/.shellcheckrc.
>>
>> Add symlinks at {gdbserver,gdbsupport}/.shellcheckrc.
>>
>> These symlinks will be expanded to regular files in the tarballs as produced
>> by src-release.sh due to using "tar -h".
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
>
> I did not know there were optionl / disabled by default rules.
>
> https://github.com/koalaman/shellcheck/wiki/Optional
>
> I think we should look at enabling some of them.
>
Hi Simon,
thanks for the review, I've pushed this.
I agree we could look into optional rules (perhaps a good moment is once
all scripts are shellcheck-clean).
FWIW, I wish something opposite to require-variable-braces would be
available.
Thanks,
- Tom
> Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [gdb] Add .shellcheckrc
2026-08-31 8:22 [PATCH] [gdb] Add .shellcheckrc Tom de Vries
2026-08-31 20:05 ` Simon Marchi
@ 2026-09-01 16:25 ` Tom Tromey
2026-09-01 16:27 ` Tom de Vries
1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2026-09-01 16:25 UTC (permalink / raw)
To: Tom de Vries; +Cc: gdb-patches
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> These symlinks will be expanded to regular files in the tarballs as produced
Tom> by src-release.sh due to using "tar -h".
I thought we avoided symlinks in the source tree for some reason, I
assume Windows. Do you know?
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [gdb] Add .shellcheckrc
2026-09-01 16:25 ` Tom Tromey
@ 2026-09-01 16:27 ` Tom de Vries
2026-09-01 21:37 ` Tom de Vries
0 siblings, 1 reply; 6+ messages in thread
From: Tom de Vries @ 2026-09-01 16:27 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 9/1/26 6:25 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> These symlinks will be expanded to regular files in the tarballs as produced
> Tom> by src-release.sh due to using "tar -h".
>
> I thought we avoided symlinks in the source tree for some reason, I
> assume Windows. Do you know?
Hi Tom,
By now, I think we do.
I was working on a patch series today that changes this to files, but
that got interrupted. I'll submit probably tomorrow.
Thanks,
- Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [gdb] Add .shellcheckrc
2026-09-01 16:27 ` Tom de Vries
@ 2026-09-01 21:37 ` Tom de Vries
0 siblings, 0 replies; 6+ messages in thread
From: Tom de Vries @ 2026-09-01 21:37 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 9/1/26 6:27 PM, Tom de Vries wrote:
> On 9/1/26 6:25 PM, Tom Tromey wrote:
>>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>>
>> Tom> These symlinks will be expanded to regular files in the tarballs
>> as produced
>> Tom> by src-release.sh due to using "tar -h".
>>
>> I thought we avoided symlinks in the source tree for some reason, I
>> assume Windows. Do you know?
>
> Hi Tom,
>
> By now, I think we do.
>
> I was working on a patch series today that changes this to files, but
> that got interrupted. I'll submit probably tomorrow.
>
It's here (
https://sourceware.org/pipermail/gdb-patches/2026-September/229938.html ).
Thanks,
- Tom
> Thanks,
> - Tom
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-01 21:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 8:22 [PATCH] [gdb] Add .shellcheckrc Tom de Vries
2026-08-31 20:05 ` Simon Marchi
2026-08-31 23:04 ` Tom de Vries
2026-09-01 16:25 ` Tom Tromey
2026-09-01 16:27 ` Tom de Vries
2026-09-01 21:37 ` Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox