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

Adapt cppcheck output parser to cppcheck v1.90

The GitLab runner machine previously ran Ubuntu 18.04, which featured
cppcheck 1.82. Some planned enhancements to the CI scripts required a newer
version of cppcheck, so we have upgraded it to Ubuntu 20.04, which has
cppcheck 1.90. However, the format of the diagnostics printed by cppcheck
has changed in 1.90, so our code that parsed them needs adapting to match.
parent efdce52e
Pipeline #3563 passed with stage
in 3 seconds
......@@ -575,7 +575,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 --std=c99 $CFLAGS -UNAMESPACE_OSLIB -U__swi --verbose --max-configs=100 objs/*.c; } 3>&1 1>&2 2>&3; } | tee >( grep -v '^[^ ]* information[:] ' | grep -v '^$' | 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