diff mbox series

[kvm-unit-tests,2/2] shellcheck: Suppress SC2209 quoting warning in config.mak

Message ID 20240503052510.968229-3-npiggin@gmail.com (mailing list archive)
State New
Headers show
Series shellcheck: post-merge fixups | expand

Commit Message

Nicholas Piggin May 3, 2024, 5:25 a.m. UTC
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 typical Makefile style.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Huth May 3, 2024, 6:31 a.m. UTC | #1
On 03/05/2024 07.25, Nicholas Piggin wrote:
> 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 typical Makefile style.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   configure | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/configure b/configure
> index a8520a35f..0e0a28825 100755
> --- a/configure
> +++ b/configure
> @@ -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

Tested-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/configure b/configure
index a8520a35f..0e0a28825 100755
--- a/configure
+++ b/configure
@@ -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