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

Method misra_4_2

addons/misra.py:1852–1861  ·  view source on GitHub ↗
(self, rawTokens)

Source from the content-addressed store, hash-verified

1850 self.reportError(token, 4, 1)
1851
1852 def misra_4_2(self, rawTokens):
1853 for token in rawTokens:
1854 if (token.str[0] != '"') or (token.str[-1] != '"'):
1855 continue
1856 # Check for trigraph sequence as defined by ISO/IEC 9899:1999
1857 for sequence in ['??=', '??(', '??/', '??)', '??\'', '??<', '??!', '??>', '??-&#x27;]:
1858 if sequence in token.str[1:-1]:
1859 # First trigraph sequence match, report error and leave loop.
1860 self.reportError(token, 4, 2)
1861 break
1862
1863 def misra_5_1(self, data):
1864 long_vars = {}

Callers

nothing calls this directly

Calls 1

reportErrorMethod · 0.95

Tested by

no test coverage detected