Hugo L'Hostis | 8c7cb64 | 2021-04-22 12:12:05 +0100 | [diff] [blame] | 1 | ######################### |
| 2 | Static Checking Framework |
| 3 | ######################### |
| 4 | |
| 5 | This tool has been made to provide a framework to check the truster-firmware-m |
| 6 | (TF-M) code base. |
| 7 | |
| 8 | ************ |
| 9 | Instructions |
| 10 | ************ |
| 11 | |
| 12 | This tool should be used from the root of the TF-M repository. launching |
| 13 | run_all_checks.sh will launch the different checkers used : |
| 14 | |
Elena Uziunaite | bd4d7a9 | 2023-10-24 15:58:31 +0100 | [diff] [blame^] | 15 | - :doc:`Cppcheck <cppcheck>` |
| 16 | - :doc:`Copyright header check <header_check>` |
| 17 | - :doc:`clang-format <clang_format>` |
| 18 | - :doc:`Checkpatch <checkpatch>` |
Salome Thirot | 0ea1daf | 2021-04-23 13:16:16 +0100 | [diff] [blame] | 19 | |
| 20 | Both checkpatch and clang-format are use to check the coding style, but they |
| 21 | both cover different cases so together they provide a better coverage. |
Hugo L'Hostis | 8c7cb64 | 2021-04-22 12:12:05 +0100 | [diff] [blame] | 22 | |
| 23 | Each tool will be configured using a setup.sh script located under the tool |
| 24 | directory before being launched. The main script might need to be launched with |
| 25 | root priviledges in order to correctly install the tools on the first time it |
| 26 | is being used. |
| 27 | |
| 28 | The tool will return exit code of 0 if everything is compliant, and no |
| 29 | new warnings are generated, and 1 in all other occasions. |
| 30 | |
| 31 | Output reports if produced by each corresponding script, will be stored at |
| 32 | `{TFM-Root}/checks_reports`` |
| 33 | |
Minos Galanakis | cfeb885 | 2021-06-30 17:10:59 +0100 | [diff] [blame] | 34 | .. toctree:: |
| 35 | :caption: Table of Contents |
| 36 | :name: mastertoc |
Elena Uziunaite | bd4d7a9 | 2023-10-24 15:58:31 +0100 | [diff] [blame^] | 37 | :maxdepth: 1 |
Minos Galanakis | cfeb885 | 2021-06-30 17:10:59 +0100 | [diff] [blame] | 38 | |
Elena Uziunaite | bd4d7a9 | 2023-10-24 15:58:31 +0100 | [diff] [blame^] | 39 | cppcheck |
| 40 | clang_format |
| 41 | checkpatch |
| 42 | header_check |
| 43 | git_hooks |
Minos Galanakis | cfeb885 | 2021-06-30 17:10:59 +0100 | [diff] [blame] | 44 | |
Hugo L'Hostis | 8c7cb64 | 2021-04-22 12:12:05 +0100 | [diff] [blame] | 45 | -------------- |
| 46 | |
| 47 | *Copyright (c) 2021, Arm Limited. All rights reserved.* |
Salome Thirot | 0ea1daf | 2021-04-23 13:16:16 +0100 | [diff] [blame] | 48 | *SPDX-License-Identifier: BSD-3-Clause* |