We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dec57ed commit 575f42eCopy full SHA for 575f42e
c/misra/src/rules/RULE-16-4/EverySwitchShallHaveDefaultLabel.ql
@@ -23,9 +23,7 @@ where
23
exists(SwitchCase case, BreakStmt break |
24
switch.getDefaultCase() = case and
25
case.getFollowingStmt() = break and
26
- not exists(Comment comment |
27
- break.getLocation().getEndLine() - 1 = comment.getLocation().getEndLine()
28
- ) and
+ not exists(Comment comment | comment.getCommentedElement() = break) and
29
message =
30
"has default label that does not terminate in a statement or comment before break statement"
31
)
0 commit comments