From bc0553aabda6b34ee15bbf80e9a27592601e3baa Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 18 Aug 2024 20:27:16 -0300 Subject: [PATCH] Denote function locals with 'local' --- libexec/sourcezap/commands/sourcezap-install | 3 +++ libexec/sourcezap/commands/sourcezap-rm | 2 ++ 2 files changed, 5 insertions(+) diff --git a/libexec/sourcezap/commands/sourcezap-install b/libexec/sourcezap/commands/sourcezap-install index fed41be..5ff16f8 100755 --- a/libexec/sourcezap/commands/sourcezap-install +++ b/libexec/sourcezap/commands/sourcezap-install @@ -18,6 +18,9 @@ revfile=$3 perform_update() { + # shellcheck disable=SC3043 + local rev add del \ + target parent parents rev=$(cat "${revfile}") add=$("${libexec}"/utils/git/get-changed-files "${gitdir}" "${rev}") del=$("${libexec}"/utils/git/get-removed-files "${gitdir}" "${rev}") diff --git a/libexec/sourcezap/commands/sourcezap-rm b/libexec/sourcezap/commands/sourcezap-rm index 1fb53de..21f1e31 100755 --- a/libexec/sourcezap/commands/sourcezap-rm +++ b/libexec/sourcezap/commands/sourcezap-rm @@ -15,6 +15,8 @@ installdir=$2 erase() { + # shellcheck disable=SC3043 + local dir dir="${1}" printf "%s " "${dir}" find "${dir}" \