Skip to content

Commit 6dc64be

Browse files
committed
Add rule package of Banned2
1 parent c38d0ee commit 6dc64be

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

rule_packages/cpp/Banned2.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"MISRA-C++-2023": {
3+
"RULE-10-2-2": {
4+
"properties": {
5+
"enforcement": "decidable",
6+
"obligation": "advisory"
7+
},
8+
"queries": [
9+
{
10+
"description": "An unscoped enumeration should not be used outside of a class/struct scope; use 'enum class' instead to prevent name clashes and implicit conversions to integral types.",
11+
"kind": "problem",
12+
"name": "Unscoped enumerations should not be declared",
13+
"precision": "very-high",
14+
"severity": "error",
15+
"short_name": "UnscopedEnumerationsShouldNotBeDeclared",
16+
"tags": [
17+
"scope/single-translation-unit",
18+
"correctness"
19+
]
20+
}
21+
],
22+
"title": "Unscoped enumerations should not be declared"
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)