From b43789dbbcfe69428a20e6e96110426a7f5722eb Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Feb 22 2023 14:42:50 +0000 Subject: Fix ShellCheck test failure Signed-off-by: Stephen Gallagher --- diff --git a/0001-Disable-shellcheck-warnings.patch b/0001-Disable-shellcheck-warnings.patch new file mode 100644 index 0000000..57e4864 --- /dev/null +++ b/0001-Disable-shellcheck-warnings.patch @@ -0,0 +1,33 @@ +From c9aa3920a716be12b9a0604fc61aaa39d1a79946 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Wed, 22 Feb 2023 08:02:47 -0500 +Subject: [PATCH] Disable shellcheck warnings + +ShellCheck now returns non-zero for these warnings, causing the tests to fail. +This just excludes them from the checks. + +Signed-off-by: Stephen Gallagher +--- + resources/Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/resources/Makefile b/resources/Makefile +index 8d1eaac36a0d27f6afdb4a92c8fbc63006ec18fb..04f093d06d7c34161f48458e18d97b50c14d1a0f 100644 +--- a/resources/Makefile ++++ b/resources/Makefile +@@ -1,7 +1,11 @@ + NUL = + + # SC2015: Note that A && B || C is not if-then-else. C may run when A is true. +-SHELLCHECK_EXCLUDE_CHECKS_ARGUMENT = -e 2015 ++# SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a ++# purpose. ++# SC2317 (info): Command appears to be unreachable. Check usage (or ignore if ++# invoked indirectly). ++SHELLCHECK_EXCLUDE_CHECKS_ARGUMENT = -e 2015 -e 2268 -e 2317 + + SHELLCHECK = $(shell shellcheck -V > /dev/null && echo "shellcheck -x $(SHELLCHECK_EXCLUDE_CHECKS_ARGUMENT)") + +-- +2.39.2 + diff --git a/argbash.spec b/argbash.spec index 805576a..0d65246 100644 --- a/argbash.spec +++ b/argbash.spec @@ -29,6 +29,10 @@ Requires: sed Recommends: bash-completion %endif +# Submitted upstream: https://github.com/matejak/argbash/pull/177 +Patch: 0001-Disable-shellcheck-warnings.patch + + %description Argbash helps your shell scripts to accept arguments. You declare what arguments you want your script to accept and Argbash @@ -54,7 +58,7 @@ cd resources && \ make install %check -cd resources && make check +cd resources && %{make_build} check %files %license LICENSE