re_error = re.compile('ERROR:%s (.*)' % type_name)
re_warning = re.compile(emacs_prefix + 'WARNING:%s (.*)' % type_name)
re_check = re.compile('CHECK:%s (.*)' % type_name)
- re_file = re.compile('#\d+: FILE: ([^:]*):(\d+):')
+ re_file = re.compile('#(\d+): (FILE: ([^:]*):(\d+):)?')
re_note = re.compile('NOTE: (.*)')
re_new_file = re.compile('new file mode .*')
indent = ' ' * 6
item['msg'] = check_match.group(2)
item['type'] = 'check'
elif file_match:
- item['file'] = file_match.group(1)
- item['line'] = int(file_match.group(2))
+ err_fname = file_match.group(3)
+ if err_fname:
+ item['file'] = err_fname
+ item['line'] = int(file_match.group(4))
+ else:
+ item['file'] = '<patch>'
+ item['line'] = int(file_match.group(1))
elif subject_match:
item['file'] = '<patch subject>'
item['line'] = None