MISRA: Extend the R3.1 deviation for URLs to include git://

xen/drivers/passthrough/arm/ipmmu-vmsa.c contains a git:// URL in a block
comment.  This is also not an example of commented out code, so shouldn't be
considered a R3.1 violation.

Extend the regex to include git://, and swap hyperlink for URL in the
associated documentation to be more precise.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
This commit is contained in:
Andrew Cooper committed 2026-01-09 14:24:24 +00:00
1 parent 913f40f4d1
commit fe0ede8fe4
3 files changed
+5 -5

No files matched your search

@@ -58,9 +58,9 @@ removed by the compiler, the resulting slowdown is negligible."
# Series 3. # Series 3.
# #
-doc_begin="Comments starting with '/*' and containing hyperlinks are safe as -doc_begin="Comments starting with '/*' and containing URLs are safe as
they are not instances of commented-out code." they are not instances of commented-out code."
-config=MC3A2.R3.1,reports+={safe, "first_area(text(^.*https?://.*$))"} -config=MC3A2.R3.1,reports+={safe, "first_area(text(^.*(https?|git)://.*$))"}
-doc_end -doc_end
# #
+2 -2
View File
@@ -117,8 +117,8 @@ Deviations related to MISRA C:2012 Rules:
- Tagged as `deliberate` for ECLAIR. - Tagged as `deliberate` for ECLAIR.
* - R3.1 * - R3.1
- Comments starting with '/\*' and containing hyperlinks are safe as they - Comments starting with '/\*' and containing URLs are safe as they are
are not instances of commented-out code. not instances of commented-out code.
- Tagged as `safe` for ECLAIR. - Tagged as `safe` for ECLAIR.
* - R5.3 * - R5.3
+1 -1
View File
@@ -143,7 +143,7 @@ maintainers if you want to suggest a change.
- Required - Required
- The character sequences /* and // shall not be used within a - The character sequences /* and // shall not be used within a
comment comment
- Comments containing hyperlinks inside C-style block comments are safe - Comments containing URLs inside C-style block comments are safe
* - `Rule 3.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_02.c>`_ * - `Rule 3.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_03_02.c>`_
- Required - Required
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.