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