mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 23:51:07 -05:00
Skip shfmt if no .editorconfig file is present
This commit is contained in:
parent
61fcd7f44f
commit
f5331bdcd3
1 changed files with 11 additions and 2 deletions
|
@ -1852,8 +1852,17 @@ if [ "${VALIDATE_SHELL_SHFMT}" == "true" ]; then
|
||||||
####################################
|
####################################
|
||||||
# Lint the files with shfmt #
|
# Lint the files with shfmt #
|
||||||
####################################
|
####################################
|
||||||
|
EDITORCONFIG_FILE_PATH="${GITHUB_WORKSPACE}"/.editorconfig
|
||||||
|
if [ -e "$EDITORCONFIG_FILE_PATH" ]; then
|
||||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
|
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
|
||||||
LintCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "${FILE_ARRAY_BASH[@]}"
|
LintCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "${FILE_ARRAY_BASH[@]}"
|
||||||
|
else
|
||||||
|
###############################
|
||||||
|
# No .editorconfig file found #
|
||||||
|
###############################
|
||||||
|
warn "No .editorconfig found at:[$EDITORCONFIG_FILE_PATH]"
|
||||||
|
debug "skipping shfmt"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
|
Loading…
Reference in a new issue