Quick cleanup on calls-loop to output result as a single line

pull/226/head
David Pokora 6 years ago
parent 2dd9fbde0f
commit 5725162904
No known key found for this signature in database
GPG Key ID: 3CED48D1BB21BDD7
  1. 7
      slither/detectors/statements/calls_in_loop.py

@ -86,14 +86,11 @@ If one of the destinations has a fallback function which reverts, `bad` will alw
values = self.detect_call_in_loop(c)
for node in values:
func = node.function
info = "{}.{} has external calls inside a loop:\n"
info = info.format(func.contract.name, func.name)
info += "\t- {} ({})\n".format(node.expression, node.source_mapping_str)
info = "{}.{} has external calls inside a loop: \"{}\" ({})\n"
info = info.format(func.contract.name, func.name, node.expression, node.source_mapping_str)
json = self.generate_json_result(info)
self.add_node_to_json(node, json)
self.add_function_to_json(func, json)
results.append(json)
return results

Loading…
Cancel
Save