1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #17134 from miri64/cppcheck/enh/all-errors

cppcheck: output all annotations as error
This commit is contained in:
Martine Lenders 2021-11-25 13:12:53 +01:00 committed by GitHub
commit 1b9146ec21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}"