rspec/rules/S2747/cfamily/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

38 lines
1.1 KiB
Plaintext

== Why is this an issue?
== Resources
* MISRA C:2012, 8.12 - Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique
* https://wiki.sei.cmu.edu/confluence/x/U9cxBQ[CERT, INT09-C.] - Ensure enumeration constants map to unique values
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
=== on 20 Mar 2015, 21:36:50 Evgeny Mandrikov wrote:
I'm wondering about intersection with RSPEC-841.
\[~massimo.paladin] any thoughts?
=== on 25 Mar 2015, 09:52:21 Massimo PALADIN wrote:
\[~evgeny.mandrikov] RSPEC-841 covers the aim of this rule, the only exception is when all the elements are explicitly specified which may lead to non-unique values and which is likely to be intentional. I do not see the real need of this rule, probably we should add this see section links to RSPEC-841.
=== on 20 Jul 2015, 12:53:11 Ann Campbell wrote:
I'm wondering how what this rule forbids is possible
=== on 8 Nov 2018, 15:13:42 Loïc Joly wrote:
\[~ann.campbell.2]
----
enum strange
{
a = 2,
b = 1,
c // will be ==2
};
----
endif::env-github,rspecator-view[]