fix(tools/cppcheck): suppress misra warnings
Suppress misra warning rules-
misra-c2012-12.3 - Comma should not be used
misra-config - To suppress COMPILER_ASSERT warnings
Suppress cppcheck warning due to const params/variables.
Also added `checkers-report` to the cppcheck cmdline as
this gives details on the checkers invoked and there
was an error from the tool without this option.
Change-Id: I56701f11794307a854521e087455811d01bc9577
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
diff --git a/tools/cppcheck/CPPCheck.cmake b/tools/cppcheck/CPPCheck.cmake
index 81411a1..fc90ab8 100644
--- a/tools/cppcheck/CPPCheck.cmake
+++ b/tools/cppcheck/CPPCheck.cmake
@@ -18,7 +18,7 @@
list(APPEND cppcheck-flags "--xml")
list(APPEND cppcheck-flags "--xml-version=2")
list(APPEND cppcheck-flags "--template=gcc")
-
+list(APPEND cppcheck-flags "--check-level=exhaustive")
if(CPPCHECK_MISRA)
list(APPEND cppcheck-flags "--addon=${SOURCE_DIR}/tools/cppcheck/misra.json")
@@ -31,6 +31,7 @@
list(APPEND cppcheck-flags "--output-file=${CPPCHECK_OUTPUT}")
list(APPEND cppcheck-flags "--cppcheck-build-dir=${CPPCHECK_BUILD_DIR}")
+list(APPEND cppcheck-flags "--checkers-report=${BUILD_DIR}/tools/cppcheck/checkers.log")
#
# Exclude files or directories we don't want to receive warnings about.