From 5725162904bb59178f20d30c9ba125810eb6cf00 Mon Sep 17 00:00:00 2001 From: David Pokora Date: Wed, 8 May 2019 12:18:17 -0400 Subject: [PATCH] Quick cleanup on calls-loop to output result as a single line --- slither/detectors/statements/calls_in_loop.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/slither/detectors/statements/calls_in_loop.py b/slither/detectors/statements/calls_in_loop.py index e3131694d..187e2a748 100644 --- a/slither/detectors/statements/calls_in_loop.py +++ b/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