shellcheck: post-merge fixups
cover shellcheck: post-merge fixups
Thomas noticed a couple of issues after merge (did you report at least one before merge and I didn't notice? -- apologies if yes).
Thanks,
Nick
Nicholas Piggin (2):
shellcheck: Fix shellcheck target with out of tree build
shellcheck: Suppress SC2209 quoting warning in config.mak
Makefile | 2 +- configure | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH 1/2 shellcheck: Fix shellcheck target with out of tree build
Prepend source directory to script names, and include source directory in shellcheck search path.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -143,7 +143,7 @@ cscope: .PHONY: shellcheck shellcheck: - shellcheck -a run_tests.sh */run */efi/run scripts/mkstandalone.sh + shellcheck -P $(SRCDIR) -a $(SRCDIR)/run_tests.sh $(SRCDIR)/*/run $(SRCDIR)/*/efi/run $(SRCDIR)/scripts/mkstandalone.sh .PHONY: tags tags:
Signature · 1 line
2.43.0
Re: [kvm-unit-tests PATCH 1/2] shellcheck: Fix shellcheck target with out of tree build
Quoted 14 lines · Nicholas Piggin
Prepend source directory to script names, and include source directory in shellcheck search path.
Fixes ddfdcc3929aef ("Add initial shellcheck checking")Signed-off-by Nicholas Piggin <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0
Makefile cscope: · line 149
Quoted 8 lines
Makefile +1
-1@@ -143,7 +143,7 @@ cscope: .PHONY: shellcheck shellcheck: - shellcheck -a run_tests.sh */run */efi/run scripts/mkstandalone.sh + shellcheck -P $(SRCDIR) -a $(SRCDIR)/run_tests.sh $(SRCDIR)/*/run $(SRCDIR)/*/efi/run $(SRCDIR)/scripts/mkstandalone.sh .PHONY: tags tags:
PATCH 2/2 shellcheck: Suppress SC2209 quoting warning in config.mak
In reply to Nicholas PigginIt's not necessary to quote strings in simple command variables like this where the pattern makes the intention quite clear.
config.mak is also included as Makefile, and in that case the quotes do slightly change behaviour (the quotes are used when invoking the command), and is not the typical Makefile style.
--- configure | 2 ++ 1 file changed, 2 insertions(+)
configure +2 -0
@@ -420,6 +420,8 @@ ln -sf "$asm" lib/asm cat <<EOF > config.mak # Shellcheck does not see these are used # shellcheck disable=SC2034 +# Shellcheck can give pointless quoting warnings for some commands +# shellcheck disable=SC2209 SRCDIR=$srcdir PREFIX=$prefix HOST=$host
Signature · 1 line
2.43.0
Re: [kvm-unit-tests PATCH 2/2] shellcheck: Suppress SC2209 quoting warning in config.mak
Quoted 17 lines · Nicholas Piggin
It's not necessary to quote strings in simple command variables like this where the pattern makes the intention quite clear.
config.mak is also included as
Makefile, and in that case the quotes do slightly change behaviour (the quotes are used when invoking the command), and is not the typicalMakefilestyle.Signed-off-by Nicholas Piggin <[email protected]>--- configure | 2 ++ 1 file changed, 2 insertions(+)configure +0
-0
configure ln -sf "$asm" lib/asm · line 427
Quoted 8 lines
configure +2
-0@@ -420,6 +420,8 @@ ln -sf "$asm" lib/asm cat <<EOF > config.mak # Shellcheck does not see these are used # shellcheck disable=SC2034 +# Shellcheck can give pointless quoting warnings for some commands +# shellcheck disable=SC2209 SRCDIR=$srcdir PREFIX=$prefix HOST=$host
Quoted 2 lines · Nicholas Piggin
Thomas noticed a couple of issues after merge (did you report at least one before merge and I didn't notice? -- apologies if yes).
No worries, I just started testing at the same time as Drew pushed the patches to the master branch.
Quoted 10 lines
Thanks,
NickNicholas Piggin (2):
shellcheck: Fix shellcheck target with out of tree build
shellcheck: Suppress SC2209 quoting warning in config.makMakefile | 2 +- configure | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Thanks! Fixes applied.
Thomas