summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2017-02-27 18:32:35 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2017-02-27 18:32:35 +0100
commit265e44cd53d43f581f13fb31dccdc4da35144dc1 (patch)
treea9259769f0d05720d57e845eda028caeb0b2e650
parentecdc0b2a576cfddabc9b9763a32b28ae30fee3c0 (diff)
monkey.rules: only report the first unknown pattern
-rw-r--r--monkey/rules.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/monkey/rules.py b/monkey/rules.py
index fcd9582..c8e1a65 100644
--- a/monkey/rules.py
+++ b/monkey/rules.py
@@ -109,6 +109,7 @@ def suggest_unknown_pattern(bugs, program, patterns):
node = node.parent()
if not any(n is node for n in top_nodes):
top_nodes.append(node)
+ break # report only one pattern at a time
if hints:
hints.append({
'id': 'monkey_unknown',