diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 00000000..37eee86d --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1 @@ +disable=SC1090,SC1091 # Ignore warnings about being unable to follow sourced files diff --git a/advanced/Scripts/database_migration/gravity-db.sh b/advanced/Scripts/database_migration/gravity-db.sh index d701f2bf..41593368 100755 --- a/advanced/Scripts/database_migration/gravity-db.sh +++ b/advanced/Scripts/database_migration/gravity-db.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# shellcheck disable=SC1090 + # Pi-hole: A black hole for Internet advertisements # (c) 2019 Pi-hole, LLC (https://pi-hole.net) diff --git a/advanced/Scripts/list.sh b/advanced/Scripts/list.sh index 5c57f878..3280ebfa 100755 --- a/advanced/Scripts/list.sh +++ b/advanced/Scripts/list.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# shellcheck disable=SC1090 # Pi-hole: A black hole for Internet advertisements # (c) 2017 Pi-hole, LLC (https://pi-hole.net) diff --git a/advanced/Scripts/piholeARPTable.sh b/advanced/Scripts/piholeARPTable.sh index f55b1320..e0565148 100755 --- a/advanced/Scripts/piholeARPTable.sh +++ b/advanced/Scripts/piholeARPTable.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# shellcheck disable=SC1090 # Pi-hole: A black hole for Internet advertisements # (c) 2019 Pi-hole, LLC (https://pi-hole.net) diff --git a/advanced/Scripts/piholeLogFlush.sh b/advanced/Scripts/piholeLogFlush.sh index 2e67a9ee..58c6a41d 100755 --- a/advanced/Scripts/piholeLogFlush.sh +++ b/advanced/Scripts/piholeLogFlush.sh @@ -7,7 +7,6 @@ # # This file is copyright under the latest version of the EUPL. # Please see LICENSE file for your rights under this license. -# shellcheck disable=SC1090 colfile="/opt/pihole/COL_TABLE" source ${colfile} diff --git a/advanced/Scripts/query.sh b/advanced/Scripts/query.sh index 3340bdd2..43498f17 100755 --- a/advanced/Scripts/query.sh +++ b/advanced/Scripts/query.sh @@ -1,5 +1,5 @@ #!/usr/bin/env sh -# shellcheck disable=SC1090 + # Ignore warning about `local` being undefinded in POSIX # shellcheck disable=SC3043 diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index d7441105..e94ef0fd 100755 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -21,7 +21,6 @@ SKIP_INSTALL=true # when --check-only is passed to this script, it will not perform the actual update CHECK_ONLY=false -# shellcheck disable=SC1090 source "${PI_HOLE_FILES_DIR}/automated install/basic-install.sh" # shellcheck disable=SC1091 source "/opt/pihole/COL_TABLE" diff --git a/advanced/Scripts/version.sh b/advanced/Scripts/version.sh index 540924c2..54b89498 100755 --- a/advanced/Scripts/version.sh +++ b/advanced/Scripts/version.sh @@ -16,12 +16,10 @@ cachedVersions="/etc/pihole/versions" if [ -f ${cachedVersions} ]; then - # shellcheck disable=SC1090 . "$cachedVersions" else echo "Could not find /etc/pihole/versions. Running update now." pihole updatechecker - # shellcheck disable=SC1090 . "$cachedVersions" fi diff --git a/advanced/Templates/pihole-FTL-poststop.sh b/advanced/Templates/pihole-FTL-poststop.sh index b5ddbc97..d196e3da 100755 --- a/advanced/Templates/pihole-FTL-poststop.sh +++ b/advanced/Templates/pihole-FTL-poststop.sh @@ -3,7 +3,6 @@ # Source utils.sh for getFTLConfigValue() PI_HOLE_SCRIPT_DIR='/opt/pihole' utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh" -# shellcheck disable=SC1090 . "${utilsfile}" # Get file paths diff --git a/advanced/Templates/pihole-FTL-prestart.sh b/advanced/Templates/pihole-FTL-prestart.sh index 37d750a2..5bfd1b17 100755 --- a/advanced/Templates/pihole-FTL-prestart.sh +++ b/advanced/Templates/pihole-FTL-prestart.sh @@ -3,7 +3,6 @@ # Source utils.sh for getFTLConfigValue() PI_HOLE_SCRIPT_DIR='/opt/pihole' utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh" -# shellcheck disable=SC1090 . "${utilsfile}" # Get file paths diff --git a/advanced/Templates/pihole-FTL.service b/advanced/Templates/pihole-FTL.service index 151d4f90..6cb3e09a 100644 --- a/advanced/Templates/pihole-FTL.service +++ b/advanced/Templates/pihole-FTL.service @@ -12,7 +12,6 @@ # Source utils.sh for getFTLConfigValue(), getFTLPID() PI_HOLE_SCRIPT_DIR="/opt/pihole" utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh" -# shellcheck disable=SC1090 . "${utilsfile}" diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 59dbb94b..ef6e02c6 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# shellcheck disable=SC1090 # Pi-hole: A black hole for Internet advertisements # (c) Pi-hole (https://pi-hole.net) diff --git a/gravity.sh b/gravity.sh index 57df0712..102ec15f 100755 --- a/gravity.sh +++ b/gravity.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# shellcheck disable=SC1090 # Pi-hole: A black hole for Internet advertisements # (c) 2017 Pi-hole, LLC (https://pi-hole.net) @@ -16,11 +15,9 @@ export LC_ALL=C PI_HOLE_SCRIPT_DIR="/opt/pihole" # Source utils.sh for GetFTLConfigValue utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh" -# shellcheck disable=SC1090 . "${utilsfile}" coltable="${PI_HOLE_SCRIPT_DIR}/COL_TABLE" -# shellcheck disable=SC1090 . "${coltable}" # shellcheck disable=SC1091 . "/etc/.pihole/advanced/Scripts/database_migration/gravity-db.sh" diff --git a/pihole b/pihole index efba71f0..c780308d 100755 --- a/pihole +++ b/pihole @@ -9,8 +9,6 @@ # This file is copyright under the latest version of the EUPL. # Please see LICENSE file for your rights under this license. -# shellcheck disable=SC1090 - readonly PI_HOLE_SCRIPT_DIR="/opt/pihole" # PI_HOLE_BIN_DIR is not readonly here because in some functions (checkout),