mirror of
https://gitlab.com/spaceti-app/integrations/common/server-sdk.git
synced 2026-07-12 19:10:49 +02:00
fixing scripts ( not emmiting error when error )
fixed also cppcheck ( missing includes )
This commit is contained in:
parent
9fbf448eeb
commit
c6a8bf75e4
@ -7,4 +7,7 @@ SUBDIRS += \
|
||||
|
||||
|
||||
OTHER_FILES += \
|
||||
.gitlab-ci.yml
|
||||
.gitlab-ci.yml \
|
||||
scripts/* \
|
||||
doc/Doxy* \
|
||||
doc/pages/* \
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
||||
set -e
|
||||
|
||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; else pass "finished";fi' EXIT
|
||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; exit 1; else pass "finished";fi' EXIT
|
||||
|
||||
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
DIRNAME="${SRCDIR##*/}"
|
||||
|
||||
@ -3,17 +3,18 @@
|
||||
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
||||
set -e
|
||||
|
||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; else pass "finished";fi' EXIT
|
||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; exit 1; else pass "finished";fi' EXIT
|
||||
|
||||
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
DIRNAME="${SRCDIR##*/}"
|
||||
|
||||
exclude_dir=build
|
||||
check_dir=$SRCDIR/../src
|
||||
suppress="--suppress=missingInclude --suppress=unusedFunction"
|
||||
|
||||
FAIL=0
|
||||
main() {
|
||||
{ ERROR="$( { cppcheck $check_dir --suppress=missingIncludeSystem --suppress=unusedFunction --enable=all -i $exclude_dir; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
||||
{ ERROR="$( { cppcheck $check_dir $suppress --enable=all -i $exclude_dir; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
||||
|
||||
if [ ! -z "$ERROR" ]; then
|
||||
echo "----------------------------------"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
||||
set -e
|
||||
|
||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; else pass "finished";fi' EXIT
|
||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; exit 1; else pass "finished";fi' EXIT
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
DIR_NAME="${CURRENT_DIR##*/}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user