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

Function hasNumericEscapeSequence

addons/misra.py:1251–1258  ·  view source on GitHub ↗

Check that given string contains octal or hexadecimal escape sequences.

(symbols)

Source from the content-addressed store, hash-verified

1249
1250
1251def hasNumericEscapeSequence(symbols):
1252 """Check that given string contains octal or hexadecimal escape sequences."""
1253 if '\\' not in symbols:
1254 return False
1255 for c, cn in grouped(symbols, 2):
1256 if c == '\\' and cn in ('x' + string.octdigits):
1257 return True
1258 return False
1259
1260
1261def isNoReturnScope(tok):

Callers 1

misra_4_1Method · 0.85

Calls 1

groupedFunction · 0.85

Tested by

no test coverage detected