diff mbox series

[RFC,v2,4/8] exclude-list: add entries to the excluded list for codestyle

Message ID 20231031132304.2573924-5-luca.fancellu@arm.com (mailing list archive)
State New, archived
Headers show
Series clang-format for Xen | expand

Commit Message

Luca Fancellu Oct. 31, 2023, 1:23 p.m. UTC
Add entries to the exclusion list, so that they can be excluded
from the formatting tool.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
 docs/misra/exclude-list.json | 100 +++++++++++++++++++++++++++++++++++
 docs/misra/exclude-list.rst  |   2 +
 2 files changed, 102 insertions(+)
diff mbox series

Patch

diff --git a/docs/misra/exclude-list.json b/docs/misra/exclude-list.json
index 575ed22a7f67..d48dcf3ac971 100644
--- a/docs/misra/exclude-list.json
+++ b/docs/misra/exclude-list.json
@@ -1,6 +1,11 @@ 
 {
     "version": "1.0",
     "content": [
+        {
+            "rel_path": "arch/arm/arm32/lib/assembler.h",
+            "comment": "Includes mostly assembly macro and it's meant to be included only in assembly code",
+            "checkers": "codestyle"
+        },
         {
             "rel_path": "arch/arm/arm64/cpufeature.c",
             "comment": "Imported from Linux, ignore for now"
@@ -13,6 +18,31 @@ 
             "rel_path": "arch/arm/arm64/lib/find_next_bit.c",
             "comment": "Imported from Linux, ignore for now"
         },
+        {
+            "rel_path": "arch/arm/include/asm/arm32/macros.h",
+            "comment": "Includes only assembly macro",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/arm/include/asm/arm64/macros.h",
+            "comment": "Includes only assembly macro",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/arm/include/asm/alternative.h",
+            "comment": "Imported from Linux, ignore for now",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/arm/include/asm/asm_defns.h",
+            "comment": "Includes mostly assembly macro",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/arm/include/asm/macros.h",
+            "comment": "Includes mostly assembly macro and it's meant to be included only in assembly code",
+            "checkers": "codestyle"
+        },
         {
             "rel_path": "arch/x86/acpi/boot.c",
             "comment": "Imported from Linux, ignore for now"
@@ -69,6 +99,36 @@ 
             "rel_path": "arch/x86/cpu/mwait-idle.c",
             "comment": "Imported from Linux, ignore for now"
         },
+        {
+            "rel_path": "arch/x86/include/asm/alternative-asm.h",
+            "comment": "Includes mostly assembly macro and it's meant to be included only in assembly code",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/x86/include/asm/asm_defns.h",
+            "comment": "Includes mostly assembly macro",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/x86/include/asm/asm-defns.h",
+            "comment": "Includes mostly assembly macro",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/x86/include/asm/bug.h",
+            "comment": "Includes mostly assembly macro",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/x86/include/asm/mpspec.h",
+            "comment": "Imported from Linux, also designated initializers ranges are not handled very well by clang-format, ignore for now",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "arch/x86/include/asm/spec_ctrl_asm.h",
+            "comment": "Includes mostly assembly macro",
+            "checkers": "codestyle"
+        },
         {
             "rel_path": "arch/x86/delay.c",
             "comment": "Imported from Linux, ignore for now"
@@ -189,10 +249,45 @@ 
             "rel_path": "include/acpi/acpixf.h",
             "comment": "Imported from Linux, ignore for now"
         },
+        {
+            "rel_path": "include/efi/*.h",
+            "comment": "Imported from gnu-efi-3.0k, prefer their formatting",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "include/public/arch-x86/cpufeatureset.h",
+            "comment": "This file contains some inputs for the gen-cpuid.py script, leave it out",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "include/public/*",
+            "comment": "Public headers are quite sensitive to format tools",
+            "checkers": "codestyle"
+        },
         {
             "rel_path": "include/xen/acpi.h",
             "comment": "Imported from Linux, ignore for now"
         },
+        {
+            "rel_path": "include/xen/cper.h",
+            "comment": "Header does not follow Xen coding style",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "include/xen/nodemask.h",
+            "comment": "Imported from Linux, also designated initializers ranges are not handled by clang-format, ignore for now",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "include/xen/xen.lds.h",
+            "comment": "This file contains only macros used inside the linker script",
+            "checkers": "codestyle"
+        },
+        {
+            "rel_path": "include/hypercall-defs.c",
+            "comment": "This file contains only C preprocessing syntax, the other lines are not C and are used to generate the hypercall definition by another script.",
+            "checkers": "codestyle"
+        },
         {
             "rel_path": "lib/list-sort.c",
             "comment": "Imported from Linux, ignore for now"
@@ -205,6 +300,11 @@ 
             "rel_path": "lib/xxhash*.c",
             "comment": "Imported from Linux, ignore for now"
         },
+        {
+            "rel_path": "tools/*",
+            "comment": "Contains host tools imported from Linux, ignore for now",
+            "checkers": "codestyle"
+        },
         {
             "rel_path": "xsm/flask/*",
             "comment": "Not in scope initially as it generates many violations and it is not enabled in safety configurations"
diff --git a/docs/misra/exclude-list.rst b/docs/misra/exclude-list.rst
index 42dbceb82523..ade314100663 100644
--- a/docs/misra/exclude-list.rst
+++ b/docs/misra/exclude-list.rst
@@ -46,6 +46,8 @@  Here is an explanation of the fields inside an object of the "content" array:
    Current implemented values for this field are:
     - xen-analysis: the xen-analysis.py script exclude this entry for both MISRA
       and static analysis scan. (Implemented only for Cppcheck tool)
+    - codestyle: the codestyle.py script exclude this entry from the formatting
+      tool.
 
 To ease the review and the modifications of the entries, they shall be listed in
 alphabetical order referring to the rel_path field.