1.. SPDX-License-Identifier: CC-BY-4.0
2
3Exclude file list for xen scripts
4=================================
5
6Different Xen scripts can perform operations on the codebase to check its
7compliance for a set of rules, however Xen contains some files that are taken
8from other projects (e.g. linux) and they can't be updated to ease backporting
9fixes from their source, for this reason the file docs/misra/exclude-list.json
10is kept as a source of all these files that are external to the Xen project.
11
12Every entry of the file can be linked to different checkers, so that this list
13can be used by multiple scripts selecting only the required entries.
14
15Here is an example of the exclude-list.json file::
16
17|{
18|    "version": "1.0",
19|    "content": [
20|        {
21|            "rel_path": "relative/path/from/xen/file",
22|            "comment": "This file is originated from ...",
23|            "checkers": "xen-analysis"
24|        },
25|        {
26|            "rel_path": "relative/path/from/xen/folder/*",
27|            "comment": "This folder is a library",
28|            "checkers": "xen-analysis some-checker"
29|        },
30|        {
31|            "rel_path": "relative/path/from/xen/mem*.c",
32|            "comment": "memcpy.c, memory.c and memcmp.c are from the outside"
33|        }
34|    ]
35|}
36
37Here is an explanation of the fields inside an object of the "content" array:
38 - rel_path: it is the relative path from the Xen folder to the file/folder that
39   needs to be excluded from the analysis report, it can contain a wildcard to
40   match more than one file/folder at the time. This field is mandatory.
41 - comment: an optional comment to explain why the file is removed from the
42   analysis.
43 - checkers: an optional list of checkers that will exclude this entries from
44   their results. This field is optional and when not specified, it means every
45   checker will use that entry.
46   Current implemented values for this field are:
47
48    - xen-analysis: the xen-analysis.py script exclude this entry for both MISRA
49      and static analysis scan. (Implemented only for Cppcheck tool)
50
51To ease the review and the modifications of the entries, they shall be listed in
52alphabetical order referring to the rel_path field.
53Excluded folder paths shall end with ``/*`` in order to match everything on that
54folder.
55