Merge \"Avoid matching the same warning line twice.\"
am: 0cbba3df2a
Change-Id: I641fa895ac7033056833107bf062015987965632
This commit is contained in:
@@ -1977,15 +1977,15 @@ warningpattern = re.compile('.* warning:.*')
|
|||||||
compilepatterns()
|
compilepatterns()
|
||||||
|
|
||||||
# read the log file and classify all the warnings
|
# read the log file and classify all the warnings
|
||||||
lastmatchedline = ''
|
warninglines = set()
|
||||||
for line in infile:
|
for line in infile:
|
||||||
# replace fancy quotes with plain ol' quotes
|
# replace fancy quotes with plain ol' quotes
|
||||||
line = line.replace("‘", "'");
|
line = line.replace("‘", "'");
|
||||||
line = line.replace("’", "'");
|
line = line.replace("’", "'");
|
||||||
if warningpattern.match(line):
|
if warningpattern.match(line):
|
||||||
if line != lastmatchedline:
|
if line not in warninglines:
|
||||||
classifywarning(line)
|
classifywarning(line)
|
||||||
lastmatchedline = line
|
warninglines.add(line)
|
||||||
else:
|
else:
|
||||||
# save a little bit of time by only doing this for the first few lines
|
# save a little bit of time by only doing this for the first few lines
|
||||||
if linecounter < 50:
|
if linecounter < 50:
|
||||||
|
Reference in New Issue
Block a user