linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf build: Specify that spellcheck should use the bash dialect.
@ 2025-06-13  3:36 Collin Funk
  2025-06-19 10:28 ` James Clark
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Collin Funk @ 2025-06-13  3:36 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, Liang, Kan, James Clark
  Cc: linux-perf-users, linux-kernel, Collin Funk

When someone has a global shellcheckrc file, for example at
~/.config/shellcheckrc, with the directive 'shell=sh', building perf
will fail with many shellcheck errors like:

    In tests/shell/base_probe/test_adding_kernel.sh line 294:
    (( TEST_RESULT += $? ))
    ^---------------------^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.

    For more information:
      https://www.shellcheck.net/wiki/SC3006 -- In POSIX sh, standalone ((..)) is...
    make[5]: *** [tests/Build:91: tests/shell/base_probe/test_adding_kernel.sh.shellcheck_log] Error 1

Passing the '-s bash' option ensures that it runs correctly regardless
of a developers global configuration.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
---
 tools/perf/tests/Build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build
index 2181f5a92148..26efc5d20f6c 100644
--- a/tools/perf/tests/Build
+++ b/tools/perf/tests/Build
@@ -89,7 +89,7 @@ endif
 
 $(OUTPUT)%.shellcheck_log: %
 	$(call rule_mkdir)
-	$(Q)$(call echo-cmd,test)shellcheck -a -S warning "$<" > $@ || (cat $@ && rm $@ && false)
+	$(Q)$(call echo-cmd,test)shellcheck -s bash -a -S warning "$<" > $@ || (cat $@ && rm $@ && false)
 
 perf-test-y += $(SHELL_TEST_LOGS)
 
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-07-01 17:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13  3:36 [PATCH] perf build: Specify that spellcheck should use the bash dialect Collin Funk
2025-06-19 10:28 ` James Clark
2025-06-20 17:40   ` Collin Funk
2025-06-23  8:10     ` James Clark
2025-06-23 16:37       ` Ian Rogers
2025-06-24  2:08         ` Collin Funk
2025-06-20 19:49   ` Namhyung Kim
2025-06-23  8:08     ` James Clark
2025-06-24  2:05 ` [PATCH v2] [PATCH] perf build: Specify that shellcheck " Collin Funk
2025-06-24  5:21   ` Ian Rogers
2025-06-24  5:51     ` Collin Funk
2025-06-24  5:44 ` [PATCH v3] " Collin Funk
2025-06-24  9:37   ` James Clark
2025-06-26 17:39   ` Namhyung Kim
2025-06-28  3:35     ` Collin Funk
2025-06-28  3:49       ` Collin Funk
2025-06-28  3:41   ` [PATCH v4] " Collin Funk
2025-07-01 17:55     ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).