Skip to content

Commit

Permalink
Tell shellcheck to follow source'd files.
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Oct 26, 2023
1 parent b5cbd36 commit 9377b3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misc/git/hooks/shellcheck
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ do
# The -e SC1090,SC1091 suppressing warnings about trying to find
# files imported with "source foo.sh". We only want to lint
# the files modified as part of this current diff.
errors+=$(shellcheck -e SC1090,SC1091 "$file" 2>&1)
# The -x flag tells shellcheck to follow the files we source
# and properly validate them as well.
errors+=$(shellcheck -x -e SC1090,SC1091 "$file" 2>&1)
done

[ -z "$errors" ] && exit 0
Expand Down

0 comments on commit 9377b3f

Please sign in to comment.