Skip to content

Commit

Permalink
Add static analysis failOnError flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbos committed Apr 17, 2020
1 parent 45eb954 commit 1b76d6b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/static-analysis
Expand Up @@ -5,11 +5,18 @@ cd $(git rev-parse --show-toplevel)

savedOutput=""

failOnError=1
if [[ $1 = "false" ]]; then
failOnError=0
fi

error () {
local status=$1
echo -e "\e[0;37;41mNOK\e[0m"
echo -e "${savedOutput}\n"
# exit ${status}
if [[ ${failOnError} = 1 ]]; then
exit ${status}
fi
}

success () {
Expand Down

0 comments on commit 1b76d6b

Please sign in to comment.