SCF : Add manual static check framework
This patch sets up the structure for a basic static check framework for
TFM. The scripts should be called from the TFM repo and reports from the
tools will be stored under a check_reports directory in the TFM repo.
The cppcheck tool is added in this patch.
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: I56e648abf2c0c04cce0da3a3535481164231499f
diff --git a/static_checks/cppcheck/README.rst b/static_checks/cppcheck/README.rst
new file mode 100644
index 0000000..bc4d54c
--- /dev/null
+++ b/static_checks/cppcheck/README.rst
@@ -0,0 +1,42 @@
+########
+Cppcheck
+########
+cppcheck is a tool used to check a number of checks on the codebase. The list
+of all the checks is available at :
+https://sourceforge.net/p/cppcheck/wiki/ListOfChecks/
+
+******************
+tool configuration
+******************
+
+This tool is using the pre-existing cppcheck configurations
+(arm-cortex-m.cfg/tfm-suppress-list.txt), implementing the developer's
+guidelines, as used by the TF-M CI.
+
+The suppression list contains:
+
+ - Files that are not guaranteed to comply with the TF-M rules.
+ - Files under directories that correspond to external libraries.
+
+The files utils.sh, arm-cortex-cfg.cfg and tfm-suppress-list.txt were copied
+from the CI scripts repo :
+https://review.trustedfirmware.org/admin/repos/ci/tf-m-ci-scripts
+
+***************
+Using this tool
+***************
+
+This script must be launched from the TFM repo and the reports will be stored
+under checks_reports if the xml option is selected. The possible parameters are
+the following:
+
+ - '-h' display the help for this tool
+ - '-r' select the raw output option. If this parameter is selected, the
+ output will be displayed in the console instead of stored in an xml file
+
+
+
+--------------
+
+*Copyright (c) 2021, Arm Limited. All rights reserved.*
+*SPDX-License-Identifier: BSD-3-Clause*