feat: support bats (#1778)

Support linting of bats files by identifying them as shell scripts (they actually are)
This commit is contained in:
Xiao Liang 2021-07-19 22:30:44 +08:00 committed by GitHub
parent fa3fc56113
commit f6910e3ee9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,6 +332,7 @@ function IsValidShellScript() {
if [ "${FILE_EXTENSION}" == "sh" ] || if [ "${FILE_EXTENSION}" == "sh" ] ||
[ "${FILE_EXTENSION}" == "bash" ] || [ "${FILE_EXTENSION}" == "bash" ] ||
[ "${FILE_EXTENSION}" == "bats" ] ||
[ "${FILE_EXTENSION}" == "dash" ] || [ "${FILE_EXTENSION}" == "dash" ] ||
[ "${FILE_EXTENSION}" == "ksh" ]; then [ "${FILE_EXTENSION}" == "ksh" ]; then
debug "$FILE is a valid shell script (has a valid extension: ${FILE_EXTENSION})" debug "$FILE is a valid shell script (has a valid extension: ${FILE_EXTENSION})"