From d456885dac3b5bdfff663ed502fd11f9e0d0e070 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 10 Jan 2023 09:11:52 -0500 Subject: shellcheck: Fix new warnings Nothing important, mostly false positive except one case. Signed-off-by: David Goulet --- scripts/maint/code-format.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/maint') diff --git a/scripts/maint/code-format.sh b/scripts/maint/code-format.sh index d8f597d70d..5998e96f68 100755 --- a/scripts/maint/code-format.sh +++ b/scripts/maint/code-format.sh @@ -160,11 +160,17 @@ if [[ $GITIDX = 1 ]]; then # partially staged. note "Stashing unstaged changes" git stash -q --keep-index + # For some reasons, shellcheck is not seeing that we can call this + # function from the trap below. + # shellcheck disable=SC2317 function restoregit() { note "Restoring git state" git stash pop -q } else + # For some reasons, shellcheck is not seeing that we can call this + # function from the trap below. + # shellcheck disable=SC2317 function restoregit() { true } -- cgit v1.2.3-54-g00ecf