diff --git a/scripts/check_license.sh b/scripts/check_license.sh index 4f33a530af4..9f69b33cfa9 100755 --- a/scripts/check_license.sh +++ b/scripts/check_license.sh @@ -5,7 +5,8 @@ # SPDX-License-Identifier: Apache-2.0 # -source "$(cd $(dirname "$0") && pwd)/functions.sh" +# shellcheck source=/dev/null +source "$(cd "$(dirname "$0")" && pwd)/functions.sh" CHECK=$(git diff --name-only --diff-filter=ACMRTUXB HEAD | tr '\n' ' ') if [[ -z "$CHECK" ]]; then diff --git a/scripts/metrics_doc.sh b/scripts/metrics_doc.sh index 188c29f3265..ab01803804c 100755 --- a/scripts/metrics_doc.sh +++ b/scripts/metrics_doc.sh @@ -14,7 +14,7 @@ case "$1" in # check if the metrics documentation is up to date with the metrics # options in the tree "check") - if [ -n "$(diff -u <(cd ${fabric_dir} && ${gendoc_command}) ${metrics_doc})" ]; then + if [ -n "$(diff -u <(cd "${fabric_dir}" && ${gendoc_command}) "${metrics_doc}")" ]; then echo "The Fabric metrics reference documentation is out of date." echo "Please run '$0 generate' to update the documentation." exit 1 @@ -23,7 +23,7 @@ case "$1" in # generate the metrics documentation "generate") - (cd "${fabric_dir}" && ${gendoc_command} > ${metrics_doc}) + (cd "${fabric_dir}" && ${gendoc_command} > "${metrics_doc}") ;; *)