mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
automation/eclair: add deviation for MISRA C:2012 Rule 16.6
Update ECLAIR configuration to take into account the deviations agreed during MISRA meetings. Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
90173fc5a2
commit
ef31ffbc3d
2 files changed
+10
No files matched your search
@@ -378,6 +378,10 @@ explicit comment indicating the fallthrough intention is present."
|
||||
-config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through.? \\*/.*$,0..1))))"}
|
||||
-doc_end
|
||||
|
||||
-doc_begin="A switch statement with a single switch clause and no default label may be used in place of an equivalent if statement if it is considered to improve readability."
|
||||
-config=MC3R1.R16.6,switch_clauses+={deliberate, "default(0)"}
|
||||
-doc_end
|
||||
|
||||
#
|
||||
# Series 18.
|
||||
#
|
||||
|
||||
@@ -322,6 +322,12 @@ Deviations related to MISRA C:2012 Rules:
|
||||
- /\* Fallthrough \*/
|
||||
- /\* Fallthrough. \*/
|
||||
|
||||
* - R16.6
|
||||
- A switch statement with a single switch clause and no default label may
|
||||
be used in place of an equivalent if statement if it is considered to
|
||||
improve readability.
|
||||
- Tagged as `deliberate` for ECLAIR.
|
||||
|
||||
* - R20.7
|
||||
- Code violating Rule 20.7 is safe when macro parameters are used:
|
||||
(1) as function arguments;
|
||||
|
||||