Skip to content

Commit 7259d55

Browse files
t.fengDaniel Kiper
authored andcommitted
util/bash-completion: Disable SC2120 shellcheck warning
SC2120 (warning): function references arguments, but none are ever passed. In grub-completion.bash.in line 63: __grub_get_options_from_help () { ^-- SC2120 (warning) local prog if [ $# -ge 1 ]; then prog="$1" The arg of __grub_get_options_from_help() is optional. So, the current code meets the exception and does not need to be modified. Ignoring the warning then. More: https://github.com/koalaman/shellcheck/wiki/SC2120 Signed-off-by: t.feng <fengtao40@huawei.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1 parent e9802fb commit 7259d55

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

util/bash-completion.d/grub-completion.bash.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ __grubcomp () {
6363

6464
# Function that return long options from the help of the command
6565
# - arg: $1 (optional) command to get the long options from
66+
# shellcheck disable=SC2120
6667
__grub_get_options_from_help () {
6768
local prog
6869

0 commit comments

Comments
 (0)