mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 00:31:07 -05:00
Fixed logic
This commit is contained in:
parent
d1f140283c
commit
9a56364ac0
2 changed files with 7 additions and 15 deletions
13
Dockerfile
13
Dockerfile
|
@ -59,21 +59,14 @@ RUN apk add --update --no-cache \
|
||||||
go \
|
go \
|
||||||
icu-libs \
|
icu-libs \
|
||||||
jq \
|
jq \
|
||||||
libc-dev \
|
libc-dev libxml2-utils \
|
||||||
libxml2-utils \
|
|
||||||
make \
|
make \
|
||||||
musl-dev \
|
musl-dev \
|
||||||
npm nodejs-current \
|
npm nodejs-current \
|
||||||
openjdk8-jre \
|
openjdk8-jre \
|
||||||
perl \
|
perl \
|
||||||
php7 \
|
php7 php7-phar php7-json php7-mbstring \
|
||||||
php7-phar \
|
php7-tokenizer php7-ctype php7-curl php7-dom \
|
||||||
php7-json \
|
|
||||||
php7-mbstring \
|
|
||||||
php7-tokenizer \
|
|
||||||
php7-ctype \
|
|
||||||
php7-curl \
|
|
||||||
php7-dom \
|
|
||||||
py3-setuptools \
|
py3-setuptools \
|
||||||
readline-dev \
|
readline-dev \
|
||||||
ruby ruby-dev ruby-bundler ruby-rdoc \
|
ruby ruby-dev ruby-bundler ruby-rdoc \
|
||||||
|
|
|
@ -75,7 +75,7 @@ OPENAPI_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${OPENAPI_FILE_NAME}"
|
||||||
PHPSTAN_FILE_NAME='phpstan.neon' # Name of the file
|
PHPSTAN_FILE_NAME='phpstan.neon' # Name of the file
|
||||||
PHPSTAN_LINTER_RULES="${GITHUB_WORKSPACE}/${PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules in the repository
|
PHPSTAN_LINTER_RULES="${GITHUB_WORKSPACE}/${PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules in the repository
|
||||||
if [ ! -f "$PHPSTAN_LINTER_RULES" ]; then
|
if [ ! -f "$PHPSTAN_LINTER_RULES" ]; then
|
||||||
PHPSTAN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules
|
PHPSTAN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules
|
||||||
fi
|
fi
|
||||||
# Powershell Vars
|
# Powershell Vars
|
||||||
POWERSHELL_FILE_NAME='.powershell-psscriptanalyzer.psd1' # Name of the file
|
POWERSHELL_FILE_NAME='.powershell-psscriptanalyzer.psd1' # Name of the file
|
||||||
|
@ -125,7 +125,6 @@ LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT'
|
||||||
############################################
|
############################################
|
||||||
LINTED_LANGUAGES_ARRAY=() # Will be filled at run time with all languages that were linted
|
LINTED_LANGUAGES_ARRAY=() # Will be filled at run time with all languages that were linted
|
||||||
|
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# GitHub ENV Vars #
|
# GitHub ENV Vars #
|
||||||
###################
|
###################
|
||||||
|
@ -990,7 +989,7 @@ Footer() {
|
||||||
##################
|
##################
|
||||||
# Print if not 0 #
|
# Print if not 0 #
|
||||||
##################
|
##################
|
||||||
if [ "${!ERROR_COUNTER}" -ne 0 ]; then
|
if [[ "${!ERROR_COUNTER}" -ne 0 ]]; then
|
||||||
# We found errors in the language
|
# We found errors in the language
|
||||||
###################
|
###################
|
||||||
# Print the goods #
|
# Print the goods #
|
||||||
|
@ -1004,7 +1003,7 @@ Footer() {
|
||||||
######################################
|
######################################
|
||||||
# Check if we validated the langauge #
|
# Check if we validated the langauge #
|
||||||
######################################
|
######################################
|
||||||
elif [ "${!ERROR_COUNTER}" -eq 0 ] && [[ "${UNIQUE_LINTED_ARRAY[*]}" =~ ${LANGUAGE} ]]; then
|
elif [[ "${!ERROR_COUNTER}" -eq 0 ]] && [[ "${UNIQUE_LINTED_ARRAY[*]}" =~ ${LANGUAGE} ]]; then
|
||||||
# No errors found when linting the language
|
# No errors found when linting the language
|
||||||
CallStatusAPI "${LANGUAGE}" "success"
|
CallStatusAPI "${LANGUAGE}" "success"
|
||||||
fi
|
fi
|
||||||
|
@ -1026,7 +1025,7 @@ Footer() {
|
||||||
# build the variable
|
# build the variable
|
||||||
ERRORS_FOUND_LANGUAGE="ERRORS_FOUND_${LANGUAGE}"
|
ERRORS_FOUND_LANGUAGE="ERRORS_FOUND_${LANGUAGE}"
|
||||||
# Check if error was found
|
# Check if error was found
|
||||||
if [ "${!ERRORS_FOUND_LANGUAGE}" -ne 0 ]; then
|
if [[ "${!ERRORS_FOUND_LANGUAGE}" -ne 0 ]]; then
|
||||||
# Failed exit
|
# Failed exit
|
||||||
echo -e "${NC}${F[R]}Exiting with errors found!${NC}"
|
echo -e "${NC}${F[R]}Exiting with errors found!${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue