Skip to content

Commit

Permalink
Check if the module is in modules_in_ib.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Jul 7, 2021
1 parent 533e372 commit 8bbe5bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Utilities/StaticAnalyzers/scripts/callgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

G = nx.DiGraph()

modules = set()
with open('modules_in_ib.txt', 'r') as m:
for line in m:
modules.add(line.strip())

h = open('module_to_package.yaml', 'r')
module2package = yaml.load(h, Loader=yaml.FullLoader)

Expand Down Expand Up @@ -59,13 +64,12 @@
callstacks.add(cs)
break


report = dict()
for key in sorted(module2package.keys()):
for value in sorted(module2package[key]):
for cs in sorted(callstacks):
vre = re.compile(' %s::.*();' % value)
if vre.search(cs):
if vre.search(cs) and value in modules:
print(value, key, cs)
report.setdefault(key, {}).setdefault(value, []).append(cs)
r = open('eventsetuprecord-get.yaml', 'w')
Expand Down

0 comments on commit 8bbe5bf

Please sign in to comment.