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

Method misra_21_2

addons/misra.py:3946–3954  ·  view source on GitHub ↗
(self, cfg)

Source from the content-addressed store, hash-verified

3944 self.reportError(d, 21, 1)
3945
3946 def misra_21_2(self, cfg):
3947 for directive in cfg.directives:
3948 define = Define(directive)
3949 if re.match(r'_+BUILTIN_.*', define.name.upper()):
3950 self.reportError(directive, 21, 2)
3951 for func in cfg.functions:
3952 if isStdLibId(func.name, cfg.standards.c):
3953 tok = func.tokenDef if func.tokenDef else func.token
3954 self.reportError(tok, 21, 2)
3955
3956 def misra_21_3(self, data):
3957 for token in data.tokenlist:

Callers

nothing calls this directly

Calls 4

reportErrorMethod · 0.95
isStdLibIdFunction · 0.85
DefineClass · 0.70
matchMethod · 0.45

Tested by

no test coverage detected