[PATCH 2/2] perf build: Follow sourced files when running shellcheck
From: James Clark
Date: Mon Sep 21 2026 - 12:26:47 EST
Shellcheck follows sourced scripts when -a is provided, but only when
that file is also provided on the command line along with the one being
checked. We only ever provide one file at a time to shellcheck, so -a
does nothing.
Improve coverage by following sources using the script's directory as
the base path.
Signed-off-by: James Clark <james.clark@xxxxxxxxxx>
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 29cfd44c427f..76a17d3614a6 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -258,7 +258,7 @@ ifneq ($(SHELLCHECK),)
sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 072), 1)
SHELLCHECK :=
else
- SHELLCHECK := $(SHELLCHECK) -s bash -a -S warning
+ SHELLCHECK := $(SHELLCHECK) -s bash -a -S warning -x -P SCRIPTDIR
endif
endif
--
2.43.0