mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
cppcheck: output all annotations as error on script error
`cppcheck` has a non-zero exit code even on warnings, so to not confuse contributors, align the annotation output with that.
This commit is contained in:
parent
b0d5e9a027
commit
ca32d7704f
5
dist/tools/cppcheck/check.sh
vendored
5
dist/tools/cppcheck/check.sh
vendored
@ -80,7 +80,10 @@ if github_annotate_is_on; then
|
||||
DETAILS="${DETAILS} * (reason: <your reason why you think this is "
|
||||
DETAILS="${DETAILS}a false positive>) */\n"
|
||||
|
||||
if echo "${SEVERITY}" | grep -q "\<error\>"; then
|
||||
# contributors get confused if CI errors (i.e. non-zero result), but outputs only warnings
|
||||
# => make all warnings errors on non-zero output. Otherwise, use severity level of output
|
||||
# to determine annotation type.
|
||||
if [ ${RESULT} -ne 0 ] || echo "${SEVERITY}" | grep -q "\<error\>"; then
|
||||
github_annotate_error "${FILE}" "${LINENUM}" "${DETAILS}"
|
||||
else
|
||||
github_annotate_warning "${FILE}" "${LINENUM}" "${DETAILS}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user