Kaydet (Commit) 1ac17afe authored tarafından Noel Grandin's avatar Noel Grandin

only print the top 20 warnings

Change-Id: I85309b7d805e59da49adae74b7df21bd048deb03
üst a599eeab
...@@ -31,7 +31,9 @@ tmplist = list() # set of tuple (count, sourceAndLine) ...@@ -31,7 +31,9 @@ tmplist = list() # set of tuple (count, sourceAndLine)
for key, value in messages.iteritems(): for key, value in messages.iteritems():
tmplist.append([value,key]) 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]]) ) print( "%6d %s %s" % (i[0], i[1], sampleOfMessage[i[1]]) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment