From ff208775a5e0111e3f90f1d3b55ea9693a08854d Mon Sep 17 00:00:00 2001 From: David Farrell Date: Thu, 5 Nov 2020 08:28:33 -0800 Subject: [PATCH] Explain Bash-it variable clearing in lint script --- lint_clean_files.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lint_clean_files.sh b/lint_clean_files.sh index bd34540a..9a5a5cae 100755 --- a/lint_clean_files.sh +++ b/lint_clean_files.sh @@ -13,4 +13,11 @@ mapfile -t FILES < <( | xargs -n1 -I{} find "{}" -type f ) +# We clear the BASH_IT variable to help the schellcheck checker +# identify source includes within our scripts that require a +# 'source' directive. For more information, see: +# +# "Shellcheck SC1090 - Can't follow non-constant source" +# https://www.shellcheck.net/wiki/SC1090 +# BASH_IT='' pre-commit run --files "${FILES[@]}"