Skip to content

Commit 60e4576

Browse files
Checks: Added new MISRA04_12.10: The comma operator shall not be used [autosync]
1 parent e0019f6 commit 60e4576

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

CodeCheck/clang/misra.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,6 +2424,18 @@
24242424
}
24252425
},
24262426

2427+
"MISRA04_12.10": {
2428+
"tags": ["Language: C", "Standard: MISRA C 2004", "Category: Required", "Expressions"],
2429+
"key": "comma",
2430+
"name": "Published Standards/MISRA-C 2004/12.10 The comma operator shall not be used",
2431+
"test": "CPP_E049",
2432+
"desc": {
2433+
"html": [
2434+
"<p><b>Rationale</b></p>",
2435+
"<p>Use of the comma operator is generally detrimental to the readability of code, and the same effect can be achieved by other means.</p>"
2436+
]
2437+
}
2438+
},
24272439
"MISRA12_12.3": {
24282440
"tags": ["Language: C", "Language: C++", "Standard: MISRA C 2012", "Category: Advisory", "Expressions"],
24292441
"key": "comma",

0 commit comments

Comments
 (0)