Commit fc9d8b26 authored by Ben Avison's avatar Ben Avison
Browse files

Allow additional flags to be passed to cppcheck

These can be specified in the `.gitlab-ci.yml` file (or if launching a
pipeline manually, via the user interface) using the CPPCHECK_EXTRA variable.
parent c4d5aacf
Pipeline #3520 passed with stage
in 4 seconds
......@@ -591,7 +591,7 @@ BEGIN {
# therefore ubiquitous) and purgedConfiguration (we don't care if a build switch has no effect).
# cppcheck's --error-exitcode option appears to be too eager to report failure, so synthesise it by
# counting the number of lines printed to stderr.
print " - test ! -d c || { { { { cppcheck --enable=all --suppress=shiftNegativeLHS --suppress=purgedConfiguration --inline-suppr --std=c99 $CFLAGS -UNAMESPACE_OSLIB -U__swi --verbose --max-configs=100 objs/*.c; } 3>&1 1>&2 2>&3; } | tee >( grep -v \"(information)\" | wc -l >&3 ); } 3>&1 1>&2; } | { read lines; exit $lines; }" >> out
print " - test ! -d c || { { { { cppcheck --enable=all --suppress=shiftNegativeLHS --suppress=purgedConfiguration --inline-suppr $CPPCHECK_EXTRA --std=c99 $CFLAGS -UNAMESPACE_OSLIB -U__swi --verbose --max-configs=100 objs/*.c; } 3>&1 1>&2 2>&3; } | tee >( grep -v \"(information)\" | wc -l >&3 ); } 3>&1 1>&2; } | { read lines; exit $lines; }" >> out
print " allow_failure: true" >> out
print "" >> out
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment