[XEN PATCH v2 01/13] automation/eclair: fix deviation of MISRA C Rule 16.3

Federico Serafini posted 13 patches 5 months ago
There is a newer version of this series
[XEN PATCH v2 01/13] automation/eclair: fix deviation of MISRA C Rule 16.3
Posted by Federico Serafini 5 months ago
Escape the final dot of the comment and extend the search of a
fallthrough comment up to 2 lines after the last statement.

Fixes: a128d8da913b21eff6c6d2e2a7d4c54c054b78db "automation/eclair: add deviations for MISRA C:2012 Rule 16.3"
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
Changes in v2:
- instead of introducing the hypened fallthrough, insert the missing escape.
---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index b8f9155267..9df3e0f0c4 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -400,7 +400,7 @@ safe."
 -doc_end
 
 -doc_begin="Switch clauses ending with an explicit comment indicating the fallthrough intention are safe."
--config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through.? \\*/.*$,0..1))))"}
+-config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through\\.? \\*/.*$,0..2))))"}
 -doc_end
 
 -doc_begin="Switch statements having a controlling expression of enum type deliberately do not have a default case: gcc -Wall enables -Wswitch which warns (and breaks the build as we use -Werror) if one of the enum labels is missing from the switch."
-- 
2.34.1
Re: [XEN PATCH v2 01/13] automation/eclair: fix deviation of MISRA C Rule 16.3
Posted by Stefano Stabellini 5 months ago
On Mon, 24 Jun 2024, Federico Serafini wrote:
> Escape the final dot of the comment and extend the search of a
> fallthrough comment up to 2 lines after the last statement.
> 
> Fixes: a128d8da913b21eff6c6d2e2a7d4c54c054b78db "automation/eclair: add deviations for MISRA C:2012 Rule 16.3"
> Reported-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Re: [XEN PATCH v2 01/13] automation/eclair: fix deviation of MISRA C Rule 16.3
Posted by Jan Beulich 5 months ago
On 24.06.2024 11:04, Federico Serafini wrote:
> Escape the final dot of the comment and extend the search of a
> fallthrough comment up to 2 lines after the last statement.
> 
> Fixes: a128d8da913b21eff6c6d2e2a7d4c54c054b78db "automation/eclair: add deviations for MISRA C:2012 Rule 16.3"

Nit: Yes, the respective doc says "at least 12 digits", but please also keep
at that going forward.

Jan
Re: [XEN PATCH v2 01/13] automation/eclair: fix deviation of MISRA C Rule 16.3
Posted by Federico Serafini 5 months ago
On 24/06/24 12:57, Jan Beulich wrote:
> On 24.06.2024 11:04, Federico Serafini wrote:
>> Escape the final dot of the comment and extend the search of a
>> fallthrough comment up to 2 lines after the last statement.
>>
>> Fixes: a128d8da913b21eff6c6d2e2a7d4c54c054b78db "automation/eclair: add deviations for MISRA C:2012 Rule 16.3"
> 
> Nit: Yes, the respective doc says "at least 12 digits", but please also keep
> at that going forward.

Noted.

-- 
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)