From b3445d90e460eba9dc0f95dbdb80d1c27cda45e8 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Sat, 3 Dec 2022 16:17:28 +0900 Subject: [PATCH] include/inst: Silence shellcheck if unused variables are parameters When scanning the `inst' module with shellcheck, warnings are issued about unused variables. However, the unused variables are function parameters, which have to be declared per toolbox convention. This commit adds comments instructing shellcheck to ignore the unused function parameters. --- include/inst.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/inst.sh b/include/inst.sh index 1ac60dd..e5d51e2 100644 --- a/include/inst.sh +++ b/include/inst.sh @@ -45,6 +45,7 @@ __init() { } _inst_handle_opt_stop() { + # shellcheck disable=SC2034 # Reason: All function parameters must be declared (toolbox convention) local opt="$1" local arg="$2" @@ -53,7 +54,9 @@ _inst_handle_opt_stop() { } _inst_handle_opt_list() { + # shellcheck disable=SC2034 # Reason: All function parameters must be declared (toolbox convention) local opt="$1" + # shellcheck disable=SC2034 # Reason: All function parameters must be declared (toolbox convention) local arg="$2" inst_list "$__inst_name" -- 2.47.3