From: Matthias Kruk Date: Sat, 3 Dec 2022 07:17:28 +0000 (+0900) Subject: include/inst: Silence shellcheck if unused variables are parameters X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=b3445d90e460eba9dc0f95dbdb80d1c27cda45e8;p=toolbox 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. --- 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"