MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / misra_14_1

Method misra_14_1

addons/misra.py:3052–3063  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

3050 self.reportError(token, 13, 6)
3051
3052 def misra_14_1(self, data):
3053 for token in data.tokenlist:
3054 if token.str == 'for':
3055 exprs = getForLoopExpressions(token)
3056 if not exprs:
3057 continue
3058 for counter in findCounterTokens(exprs[1]):
3059 if counter.valueType and counter.valueType.isFloat():
3060 self.reportError(token, 14, 1)
3061 elif token.str == 'while':
3062 if isFloatCounterInWhileLoop(token):
3063 self.reportError(token, 14, 1)
3064
3065 def misra_14_2(self, data):
3066 for token in data.tokenlist:

Callers

nothing calls this directly

Calls 5

reportErrorMethod · 0.95
getForLoopExpressionsFunction · 0.85
findCounterTokensFunction · 0.85
isFloatMethod · 0.45

Tested by

no test coverage detected