(self, data)
| 3408 | self.reportError(token, 16, 5) |
| 3409 | |
| 3410 | def misra_16_6(self, data): |
| 3411 | for token in data.tokenlist: |
| 3412 | if not (simpleMatch(token, 'switch (') and simpleMatch(token.next.link, ') {')): |
| 3413 | continue |
| 3414 | tok = token.next.link.next.next |
| 3415 | count = 0 |
| 3416 | while tok: |
| 3417 | if tok.str in ['break', 'return', 'throw']: |
| 3418 | count = count + 1 |
| 3419 | elif tok.str == '{': |
| 3420 | tok = tok.link |
| 3421 | if isNoReturnScope(tok): |
| 3422 | count = count + 1 |
| 3423 | elif tok.str == '}': |
| 3424 | break |
| 3425 | tok = tok.next |
| 3426 | if count < 2: |
| 3427 | self.reportError(token, 16, 6) |
| 3428 | |
| 3429 | def misra_16_7(self, data): |
| 3430 | for token in data.tokenlist: |
nothing calls this directly
no test coverage detected