summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-29 10:36:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-29 10:37:47 +0200
commit1ac17afea63e52386c7fd822d2a7082c0619654f (patch)
tree77b17f391299eae3e18098ee4f745c51ddb8b643 /bin
parenta599eeab786ecbe1b5b6509e3c792e5c1ba31248 (diff)
only print the top 20 warnings
Change-Id: I85309b7d805e59da49adae74b7df21bd048deb03
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find-most-common-warn-messages.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/find-most-common-warn-messages.py b/bin/find-most-common-warn-messages.py
index bec6e12acd85..4686a5994519 100755
--- a/bin/find-most-common-warn-messages.py
+++ b/bin/find-most-common-warn-messages.py
@@ -31,7 +31,9 @@ tmplist = list() # set of tuple (count, sourceAndLine)
for key, value in messages.iteritems():
tmplist.append([value,key])
-for i in sorted(tmplist, key=lambda v: v[0]):
+print( "The top 20 warnings" )
+print
+for i in sorted(tmplist, key=lambda v: v[0])[-20:]:
print( "%6d %s %s" % (i[0], i[1], sampleOfMessage[i[1]]) )