Open CI Scripts: Initial Commit
* build_helper: Python script which builds sets
of configurations from a json file input
* checkpatch: Bash scripts helping with running checkpatch
* cppcheck: Bash script helping with running cppcheck
* lava_helper: Python script which generates a lava job
definition and parses the output of a lava dispatcher
* tfm_ci_pylib: Generic Python module for Open CI
* configs: Directory storing reference configurations
Change-Id: Ibda0cbfeb5b004b35fef3c2af4cb5c012f2672b4
Signed-off-by: Galanakis, Minos <minos.galanakis@linaro.org>
diff --git a/cppcheck/tfm-suppress-list.txt b/cppcheck/tfm-suppress-list.txt
new file mode 100644
index 0000000..368edb6
--- /dev/null
+++ b/cppcheck/tfm-suppress-list.txt
@@ -0,0 +1,55 @@
+//-------------------------------------------------------------------------------
+// Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved.
+//
+// SPDX-License-Identifier: BSD-3-Clause
+//
+//-------------------------------------------------------------------------------
+
+//This file contains suppression rules for CppCheck.
+//C style comments can be used.
+//
+//Each line has three parts separated by ":"
+//<message id>:<file>:<line num>
+//Where:
+// <message id> is the message id to suppress. This equals to the "id" filed
+// of the XML message record.
+// <file> Is a file name. cppcheck understands the following wildcards:
+// * matches any number of any characters
+// ? a single character
+// Note: please use '/' as directory separator.
+// <line num> The line number for which the message shall be ignored.
+//
+//Example to convert an XML record to a line in thif file:
+// <error id="invalidPrintfArgType_sint" severity="warning" msg="%d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'." verbose="%d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'." cwe="686">
+// <location file0="C:\work\tf-m\test\framework\test_framework.c" file="C:\work\tf-m\test\framework\test_framework.c" line="150"/>
+// </error>
+// to
+//invalidPrintfArgType_sint:*/tf-m/test/framework/test_framework.c:150
+//
+
+//This rule conflicts the our coding style document.
+variableScope
+
+//CppCheck fails to understand macro definitions in compile_commands.json, which
+//have \ characters escaping the opening and closing ". As a result we get the
+//following false alarms.
+preprocessorErrorDirective:*/mbedtls/platform.h:29
+preprocessorErrorDirective:*/mbedtls/sha256.h:29
+
+//CppCheck ignores macros defined on the command line when using a project file
+//(e.g. compile_commands.json). As a result we ca not set compiler specific
+//macros and need to suppress the following error.
+preprocessorErrorDirective:*/cmsis_compiler.h:320
+
+//While cppcheck states to work fine with missing standard library files, it
+//still reports a lot of errors regarding those.
+//So, ignore these.
+missingIncludeSystem
+
+//Stos cppcheck report errors regarding supression rules. These seem to be
+//buggy.
+unmatchedSuppression
+
+//arm_cmse.h is a special system include, stop complaining about it.
+missingInclude:*/tfm_core.h:11
+missingInclude:*/tfm_secure_api.h:11