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

Function isKeyword

addons/misra.py:523–534  ·  view source on GitHub ↗
(keyword, standard='c99')

Source from the content-addressed store, hash-verified

521}
522
523def isKeyword(keyword, standard='c99'):
524 kw_set = {}
525 if standard == 'c89':
526 kw_set = C90_KEYWORDS
527 elif standard == 'c99':
528 kw_set = copy.copy(C90_KEYWORDS)
529 kw_set.update(C99_ADDED_KEYWORDS)
530 else:
531 kw_set = copy.copy(C90_KEYWORDS)
532 kw_set.update(C99_ADDED_KEYWORDS)
533 kw_set.update(C11_ADDED_KEYWORDS)
534 return keyword in kw_set
535
536
537def is_source_file(file):

Callers 6

test_isKeywordFunction · 0.90
isFunctionCallFunction · 0.70
misra_17_3Method · 0.70
misra_configMethod · 0.70
misra_20_4Method · 0.70
misra_20_9Method · 0.70

Calls 2

copyMethod · 0.45
updateMethod · 0.45

Tested by 1

test_isKeywordFunction · 0.72