Fixed logic

This commit is contained in:
Lucas Gravley 2020-07-29 08:24:47 -05:00
parent d1f140283c
commit 9a56364ac0
2 changed files with 7 additions and 15 deletions

View file

@ -59,21 +59,14 @@ RUN apk add --update --no-cache \
go \
icu-libs \
jq \
libc-dev \
libxml2-utils \
libc-dev libxml2-utils \
make \
musl-dev \
npm nodejs-current \
openjdk8-jre \
perl \
php7 \
php7-phar \
php7-json \
php7-mbstring \
php7-tokenizer \
php7-ctype \
php7-curl \
php7-dom \
php7 php7-phar php7-json php7-mbstring \
php7-tokenizer php7-ctype php7-curl php7-dom \
py3-setuptools \
readline-dev \
ruby ruby-dev ruby-bundler ruby-rdoc \

View file

@ -75,7 +75,7 @@ OPENAPI_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${OPENAPI_FILE_NAME}"
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
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
# Powershell Vars
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
###################
# GitHub ENV Vars #
###################
@ -990,7 +989,7 @@ Footer() {
##################
# Print if not 0 #
##################
if [ "${!ERROR_COUNTER}" -ne 0 ]; then
if [[ "${!ERROR_COUNTER}" -ne 0 ]]; then
# We found errors in the language
###################
# Print the goods #
@ -1004,7 +1003,7 @@ Footer() {
######################################
# 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
CallStatusAPI "${LANGUAGE}" "success"
fi
@ -1026,7 +1025,7 @@ Footer() {
# build the variable
ERRORS_FOUND_LANGUAGE="ERRORS_FOUND_${LANGUAGE}"
# Check if error was found
if [ "${!ERRORS_FOUND_LANGUAGE}" -ne 0 ]; then
if [[ "${!ERRORS_FOUND_LANGUAGE}" -ne 0 ]]; then
# Failed exit
echo -e "${NC}${F[R]}Exiting with errors found!${NC}"
exit 1