mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-29 04:01:02 -05:00
commit
fb8b40f30e
1 changed files with 15 additions and 8 deletions
|
@ -1545,6 +1545,16 @@ Eslint()
|
||||||
#### Function StandardLint #####################################################
|
#### Function StandardLint #####################################################
|
||||||
StandardLint()
|
StandardLint()
|
||||||
{
|
{
|
||||||
|
####################
|
||||||
|
# Pull in the file #
|
||||||
|
####################
|
||||||
|
FILE=$1
|
||||||
|
|
||||||
|
#####################
|
||||||
|
# Get the file name #
|
||||||
|
#####################
|
||||||
|
FILE_NAME=$(basename "$FILE" 2>&1)
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# Need to get the ENV vars from the linter rules to run in command line #
|
# Need to get the ENV vars from the linter rules to run in command line #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
@ -1594,19 +1604,16 @@ StandardLint()
|
||||||
# echo "ENV:[$ENV]"
|
# echo "ENV:[$ENV]"
|
||||||
ENV_STRING+="--env ${ENV} "
|
ENV_STRING+="--env ${ENV} "
|
||||||
done
|
done
|
||||||
####################
|
|
||||||
# Pull in the file #
|
|
||||||
####################
|
|
||||||
FILE=$1
|
|
||||||
|
|
||||||
#####################
|
########################################
|
||||||
# Get the file name #
|
# Remove trailing and ending witespace #
|
||||||
#####################
|
########################################
|
||||||
FILE_NAME=$(basename "$FILE" 2>&1)
|
ENV_STRING="$(echo -e "${ENV_STRING}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# Lint the file with the rules #
|
# Lint the file with the rules #
|
||||||
################################
|
################################
|
||||||
|
echo " - Utilizing Env:[$ENV_STRING]"
|
||||||
STANDARD_LINT_CMD=$(standard "$ENV_STRING" "$FILE" 2>&1)
|
STANDARD_LINT_CMD=$(standard "$ENV_STRING" "$FILE" 2>&1)
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
|
|
Loading…
Reference in a new issue