From 3732ea736542e6651d7f6fd9adcadf78640b29f2 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 7 Apr 2025 10:24:53 +0100 Subject: [PATCH] Remove shellcheck directives that no longer serve any purpose Signed-off-by: Adam Warner --- advanced/Scripts/piholeCheckout.sh | 4 ---- advanced/Scripts/piholeDebug.sh | 1 - advanced/Scripts/update.sh | 1 - automated install/basic-install.sh | 1 - automated install/uninstall.sh | 1 - 5 files changed, 8 deletions(-) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index bde8a355..21e9df9f 100755 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -9,7 +9,6 @@ # Please see LICENSE file for your rights under this license. readonly PI_HOLE_FILES_DIR="/etc/.pihole" -# shellcheck disable=SC2034 SKIP_INSTALL="true" # shellcheck source="../../automated install/basic-install.sh" source "${PI_HOLE_FILES_DIR}/automated install/basic-install.sh" @@ -61,7 +60,6 @@ checkout() { exit 1; fi - # shellcheck disable=SC2154 if ! is_repo "${webInterfaceDir}" ; then echo -e " ${COL_LIGHT_RED}Error: Web Admin repo is missing from system!" echo -e " Please re-run install script from https://github.com/pi-hole/pi-hole${COL_NC}" @@ -106,7 +104,6 @@ checkout() { echo "master" > /etc/pihole/ftlbranch chmod 644 /etc/pihole/ftlbranch elif [[ "${1}" == "core" ]] ; then - # shellcheck disable=SC2154 str="Fetching branches from ${piholeGitUrl}" echo -ne " ${INFO} $str" if ! fully_fetch_repo "${PI_HOLE_FILES_DIR}" ; then @@ -134,7 +131,6 @@ checkout() { fi checkout_pull_branch "${PI_HOLE_FILES_DIR}" "${2}" elif [[ "${1}" == "web" ]] ; then - # shellcheck disable=SC2154 str="Fetching branches from ${webInterfaceGitUrl}" echo -ne " ${INFO} $str" if ! fully_fetch_repo "${webInterfaceDir}" ; then diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 1b196a80..caff6c5e 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -935,7 +935,6 @@ parse_file() { # Get the lines that are in the file(s) and store them in an array for parsing later local file_info if [[ -f "$filename" ]]; then - #shellcheck disable=SC2016 IFS=$'\r\n' command eval 'file_info=( $(cat "${filename}") )' else read -r -a file_info <<< "$filename" diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 7e13054e..bcd1889a 100755 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -15,7 +15,6 @@ readonly ADMIN_INTERFACE_GIT_URL="https://github.com/pi-hole/web.git" readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git" readonly PI_HOLE_FILES_DIR="/etc/.pihole" -# shellcheck disable=SC2034 SKIP_INSTALL=true # when --check-only is passed to this script, it will not perform the actual update diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 2d9041a2..983d75d7 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -769,7 +769,6 @@ chooseInterface() { # All further interfaces are deselected status="OFF" done - # shellcheck disable=SC2086 # Disable check for double quote here as we are passing a string with spaces PIHOLE_INTERFACE=$(dialog --no-shadow --keep-tite --output-fd 1 \ --cancel-label "Exit" --ok-label "Select" \ diff --git a/automated install/uninstall.sh b/automated install/uninstall.sh index 9b118627..1d365a37 100755 --- a/automated install/uninstall.sh +++ b/automated install/uninstall.sh @@ -42,7 +42,6 @@ else fi readonly PI_HOLE_FILES_DIR="/etc/.pihole" -# shellcheck disable=SC2034 SKIP_INSTALL="true" # shellcheck source="./basic-install.sh" source "${PI_HOLE_FILES_DIR}/automated install/basic-install.sh"