rspec/rules/S121/cfamily/rule.adoc
Fred Tingaud 51369b610e
Make sure that includes are always surrounded by empty lines (#2270)
When an include is not surrounded by empty lines, its content is inlined
on the same line as the adjacent content. That can lead to broken tags
and other display issues.
This PR fixes all such includes and introduces a validation step that
forbids introducing the same problem again.
2023-06-22 10:38:01 +02:00

27 lines
1.2 KiB
Plaintext

include::../rule.adoc[]
== Resources
* MISRA C:2004, 14.8 - The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement
* MISRA C:2004, 14.9 - An if (expression) construct shall be followed by a compound statement. The else keyword shall be followed by either a compound statement, or another if statement
* MISRA {cpp}:2008, 6-3-1 - The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement
* MISRA {cpp}:2008, 6-4-1 - An if (condition) construct shall be followed by a compound statement. The else keyword shall be followed by either a compound statement, or another if statement
* MISRA C:2012, 15.6 - The body of an iteration-statement or a selection-statement shall be a compound-statement
* https://wiki.sei.cmu.edu/confluence/x/g9YxBQ[CERT, EXP19-C.] - Use braces for the body of an if, for, or while statement
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]