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

Function print_checkers

tools/get_checkers.py:17–30  ·  view source on GitHub ↗
(glob_pattern:str)

Source from the content-addressed store, hash-verified

15 return iterable
16
17def print_checkers(glob_pattern:str):
18 checkers = {}
19 for filename in glob.glob(glob_pattern):
20 for line in open(filename,'rt'):
21 res = re.match(r'[ \t]*logChecker\(\s*"([^"]+)"\s*\);.*', line)
22 if res is None:
23 continue
24 if line.find('//') > 0:
25 req = line[line.find('//')+2:].strip()
26 else:
27 req = ''
28 checkers[res.group(1)] = req
29 for c,req in dict(sorted(checkers.items())).items():
30 print(' {"%s","%s"},' % (c, req))
31
32
33print("""/*

Callers 1

get_checkers.pyFile · 0.85

Calls 2

matchMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected