MISRA: Extend the R3.1 deviation for URLs to include git://
PATCH 1/1 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.
---
CC: Anthony PERARD <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Julien Grall <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: [email protected] <[email protected]>
CC: Nicola Vetrini <[email protected]>
https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2252341951
--- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++-- docs/misra/deviations.rst | 4 ++-- docs/misra/rules.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
automation/eclair_analysis/ECLAIR/deviations.ecl +2 -2
@@ -58,9 +58,9 @@ removed by the compiler, the resulting slowdown is negligible." # 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." --config=MC3A2.R3.1,reports+={safe, "first_area(text(^.*https?://.*$))"} +-config=MC3A2.R3.1,reports+={safe, "first_area(text(^.*(https?|git)://.*$))"} -doc_end #
docs/misra/deviations.rst +2 -2
@@ -117,8 +117,8 @@ Deviations related to MISRA C:2012 Rules: - Tagged as `deliberate` for ECLAIR. * - R3.1 - - Comments starting with '/\*' and containing hyperlinks are safe as they - are not instances of commented-out code. + - Comments starting with '/\*' and containing URLs are safe as they are + not instances of commented-out code. - Tagged as `safe` for ECLAIR. * - R5.3
docs/misra/rules.rst +1 -1
@@ -143,7 +143,7 @@ maintainers if you want to suggest a change. - Required - The character sequences /* and // shall not be used within a 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>`_ - Required
Signature · 1 line
2.39.5
Quoted 8 lines · Andrew Cooper
xen/drivers/passthrough/arm/ipmmu-vmsa.ccontains agit://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 <[email protected]>
~Michal
Quoted 8 lines · Andrew Cooper
xen/drivers/passthrough/arm/ipmmu-vmsa.ccontains agit://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 <[email protected]>
Quoted 70 lines
---
CC: Anthony PERARD <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Julien Grall <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: [email protected] <[email protected]>
CC: Nicola Vetrini <[email protected]>https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2252341951
--- automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++-- docs/misra/deviations.rst | 4 ++-- docs/misra/rules.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)automation/eclair_analysis/ECLAIR/deviations.ecl +0
-0@@ -58,9 +58,9 @@ removed by the compiler, the resulting slowdown isnegligible."
# 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."
--config=MC3A2.R3.1,reports+={safe, "first_area(text(^.*https?://.*$))"}+-config=MC3A2.R3.1,reports+={safe, "first_area(text(^.*(https?|git)://.*$))"}-doc_end
#
docs/misra/deviations.rst +0
-1@@ -117,8 +117,8 @@ Deviations related to MISRA C:2012 Rules: - Tagged as `deliberate` for ECLAIR. * - R3.1 - - Comments starting with '/\*' and containing hyperlinks are safeas they
docs/misra/deviations.rst +1
-1- are not instances of commented-out code. + - Comments starting with '/\*' and containing URLs are safe asthey are
docs/misra/deviations.rst +1
-0+ not instances of commented-out code. - Tagged as `safe` for ECLAIR. * - R5.3docs/misra/rules.rst +0
-1@@ -143,7 +143,7 @@ maintainers if you want to suggest a change. - Required - The character sequences /* and // shall not be used within a comment - - Comments containing hyperlinks inside C-style block commentsare 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>`_
- Required
Signature · 4 lines
Nicola Vetrini, B.Sc. Software Engineer BUGSENG (https://bugseng.com) LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253