xen/misra: add rules 1.4 and 2.1
PATCH v2 1/1 xen/misra: add rules 1.4 and 2.1
From: Stefano Stabellini <[email protected]>
Also add a comment at the top of the file to say rules.rst could be changed.
---
Changes in v2:
- add link for 1.4
- expand 1.4 comment to say it could be revisited
- add comment at the top
--- docs/misra/rules.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
docs/misra/rules.rst +15 -0
@@ -32,6 +32,9 @@ violations are meant to be documented as deviations, while some others should be fixed. Both compliance and documenting deviations on the existing codebase are work-in-progress. +The list below might need to be updated over time. Reach out to THE REST +maintainers if you want to suggest a change. + .. list-table:: :header-rows: 1
@@ -90,6 +93,18 @@ existing codebase are work-in-progress. behaviour - + * - `Rule 1.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/>`_ + - Required + - Emergent language features shall not be used + - Emergent language features, such as C11 features, should not be + confused with similar compiler extensions, which we use. When the + time comes to adopt C11, this rule will be revisited. + + * - `Rule 2.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_01_1.c>`_ + - Required + - A project shall not contain unreachable code + - + * - `Rule 2.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_06.c>`_ - Advisory - A function should not contain unused label declarations
Signature · 1 line
2.25.1
Hi Stefano,
Quoted 8 lines · Stefano Stabellini
From: Stefano Stabellini <[email protected]>
Also add a comment at the top of the file to say
rules.rstcould be changed.Signed-off-by Stefano Stabellini <[email protected]>
Cheers
Bertrand
Quoted 46 lines
---
Changes in v2:
- add link for 1.4
- expand 1.4 comment to say it could be revisited
- add comment at the top
---docs/misra/rules.rst| 15 +++++++++++++++1 file changed, 15 insertions(+)docs/misra/rules.rst +0
-0@@ -32,6 +32,9 @@ violations are meant to be documented as deviations, while some othersshould be fixed. Both compliance and documenting deviations on the existing codebase are work-in-progress.
docs/misra/rules.rst +3
-0+The list below might need to be updated over time. Reach out to THE REST +maintainers if you want to suggest a change. +.. list-table::
:header-rows: 1docs/misra/rules.rst +12
-0@@ -90,6 +93,18 @@ existing codebase are work-in-progress. behaviour - + * - `Rule 1.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/>`_ + - Required + - Emergent language features shall not be used + - Emergent language features, such as C11 features, should not be + confused with similar compiler extensions, which we use. When the + time comes to adopt C11, this rule will be revisited. + + * - `Rule 2.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_01_1.c>`_ + - Required + - A project shall not contain unreachable code + - + * - `Rule 2.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_06.c>`_ - Advisory - A function should not contain unused label declarationsSignature · 1 line
2.25.1
Quoted 10 lines · Stefano Stabellini
From: Stefano Stabellini <[email protected]>
Also add a comment at the top of the file to say
rules.rstcould be changed.Signed-off-by Stefano Stabellini <[email protected]>
Hi Stefano,
While I was testing the patch with our script that translates the docs to cppcheck Inputs, I noticed we might have a small issue there, seems that Directives and Rules clashes, and from a quick look to cppcheck addon, seems that only the rules are needed.
I’ll have a look on that soon.
Quoted 47 lines
---
Changes in v2:
- add link for 1.4
- expand 1.4 comment to say it could be revisited
- add comment at the top
---docs/misra/rules.rst| 15 +++++++++++++++1 file changed, 15 insertions(+)docs/misra/rules.rst +0
-0@@ -32,6 +32,9 @@ violations are meant to be documented as deviations, while some othersshould be fixed. Both compliance and documenting deviations on the existing codebase are work-in-progress.
docs/misra/rules.rst +3
-0+The list below might need to be updated over time. Reach out to THE REST +maintainers if you want to suggest a change. +.. list-table::
:header-rows: 1docs/misra/rules.rst +12
-0@@ -90,6 +93,18 @@ existing codebase are work-in-progress. behaviour - + * - `Rule 1.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/>`_ + - Required + - Emergent language features shall not be used + - Emergent language features, such as C11 features, should not be + confused with similar compiler extensions, which we use. When the + time comes to adopt C11, this rule will be revisited. + + * - `Rule 2.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_01_1.c>`_ + - Required + - A project shall not contain unreachable code + - + * - `Rule 2.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_06.c>`_ - Advisory - A function should not contain unused label declarationsSignature · 1 line
2.25.1
Quoted 11 lines · Luca Fancellu
Quoted 8 lines · Stefano Stabellini
From: Stefano Stabellini <[email protected]>
Also add a comment at the top of the file to say
rules.rstcould be changed.Signed-off-by Stefano Stabellini <[email protected]>Hi Stefano,
Quoted 8 lines
Reviewed-by Luca Fancellu <[email protected]>While I was testing the patch with our script that translates the docs to cppcheck Inputs, I noticed we might have a small issue there, seems that Directives and Rules clashes, and from a quick look to cppcheck addon, seems that only the rules are needed.
I’ll have a look on that soon.
Noted, thanks!
Quoted 49 lines
Quoted 47 lines
---
Changes in v2:
- add link for 1.4
- expand 1.4 comment to say it could be revisited
- add comment at the top
---docs/misra/rules.rst| 15 +++++++++++++++1 file changed, 15 insertions(+)docs/misra/rules.rst +0
-0@@ -32,6 +32,9 @@ violations are meant to be documented as deviations, while some othersshould be fixed. Both compliance and documenting deviations on the existing codebase are work-in-progress.
docs/misra/rules.rst +3
-0+The list below might need to be updated over time. Reach out to THE REST +maintainers if you want to suggest a change. +.. list-table::
:header-rows: 1docs/misra/rules.rst +12
-0@@ -90,6 +93,18 @@ existing codebase are work-in-progress. behaviour - + * - `Rule 1.4 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/>`_ + - Required + - Emergent language features shall not be used + - Emergent language features, such as C11 features, should not be + confused with similar compiler extensions, which we use. When the + time comes to adopt C11, this rule will be revisited. + + * - `Rule 2.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_01_1.c>`_ + - Required + - A project shall not contain unreachable code + - + * - `Rule 2.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_02_06.c>`_ - Advisory - A function should not contain unused label declarationsSignature · 1 line
2.25.1