mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-28 07:30:26 +09:00
patman: Don't ignore lines starting with hash
These lines can indicate a continuation of an error and should not be
ignored. Fix this.
Fixes: 666eb15e92
("patman: Handle checkpatch output with notes and code")
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9994baadc0
commit
b5e188131f
@ -95,6 +95,7 @@ def CheckPatch(fname, verbose=False, show_types=False):
|
|||||||
re_check = re.compile('CHECK:%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_note = re.compile('NOTE: (.*)')
|
||||||
|
re_new_file = re.compile('new file mode .*')
|
||||||
indent = ' ' * 6
|
indent = ' ' * 6
|
||||||
for line in result.stdout.splitlines():
|
for line in result.stdout.splitlines():
|
||||||
if verbose:
|
if verbose:
|
||||||
@ -111,8 +112,10 @@ def CheckPatch(fname, verbose=False, show_types=False):
|
|||||||
# Skip lines which quote code
|
# Skip lines which quote code
|
||||||
if line.startswith(indent):
|
if line.startswith(indent):
|
||||||
continue
|
continue
|
||||||
# Skip code quotes and #<n>
|
# Skip code quotes
|
||||||
if line.startswith('+') or line.startswith('#'):
|
if line.startswith('+'):
|
||||||
|
continue
|
||||||
|
if re_new_file.match(line):
|
||||||
continue
|
continue
|
||||||
match = re_stats_full.match(line)
|
match = re_stats_full.match(line)
|
||||||
if not match:
|
if not match:
|
||||||
|
Loading…
Reference in New Issue
Block a user