From a4554e3e69cdb283ae8aee3e28822a3ad720baea Mon Sep 17 00:00:00 2001 From: Riccardo Date: Sun, 7 Jul 2019 16:31:06 -0700 Subject: [PATCH] Ignore advisory Misra 19.2: the union keyword should not be used --- tests/misra/suppressions.txt | 2 ++ tests/misra/test_misra.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 tests/misra/suppressions.txt diff --git a/tests/misra/suppressions.txt b/tests/misra/suppressions.txt new file mode 100644 index 00000000000000..3e598f5421603e --- /dev/null +++ b/tests/misra/suppressions.txt @@ -0,0 +1,2 @@ +# Advisory: union types can be used +misra.19.2 diff --git a/tests/misra/test_misra.sh b/tests/misra/test_misra.sh index c7f6799ff5183d..83a367b3925b86 100755 --- a/tests/misra/test_misra.sh +++ b/tests/misra/test_misra.sh @@ -8,7 +8,7 @@ make -j4 cd ../../../ # panda code -tests/misra/cppcheck/cppcheck --dump --enable=all --inline-suppr board/main.c 2>/tmp/misra/cppcheck_output.txt || true +tests/misra/cppcheck/cppcheck --suppressions-list=tests/misra/suppressions.txt --dump --enable=all --inline-suppr board/main.c 2>/tmp/misra/cppcheck_output.txt || true python tests/misra/cppcheck/addons/misra.py board/main.c.dump 2>/tmp/misra/misra_output.txt || true # violations in safety files @@ -24,5 +24,5 @@ then fi # pedal code -tests/misra/cppcheck/cppcheck --dump --enable=all --inline-suppr board/pedal/main.c 2>/tmp/misra/cppcheck_pedal_output.txt || true +tests/misra/cppcheck/cppcheck --suppressions-list=tests/misra/suppressions.txt --dump --enable=all --inline-suppr board/pedal/main.c 2>/tmp/misra/cppcheck_pedal_output.txt || true python tests/misra/cppcheck/addons/misra.py board/pedal/main.c.dump 2>/tmp/misra/misra_pedal_output.txt || true