Commit b8b90135 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

[infra] Band-aid presubmit for new cpplint.py messages

Bug: v8:12743
Change-Id: I4a36c0b794759d47eb9436714dfd2417fc45dcd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3558327Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79661}
parent 2637f502
......@@ -73,7 +73,7 @@ LINT_RULES = """
-whitespace/comments
""".split()
LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing')
LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]')
FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n")
ASSERT_OPTIMIZED_PATTERN = re.compile("assertOptimized")
FLAGS_ENABLE_OPT = re.compile("//\s*Flags:.*--opt[^-].*\n")
......@@ -95,10 +95,14 @@ def CppLintWorker(command):
print("Failed to process %s" % command.pop())
return 1
break
m = LINT_OUTPUT_PATTERN.match(out_line)
if m:
out_lines += out_line
if out_line.strip() == 'Total errors found: 0':
out_lines += "Done processing %s\n" % command.pop()
error_count += 1
else:
m = LINT_OUTPUT_PATTERN.match(out_line)
if m:
out_lines += out_line
error_count += 1
sys.stdout.write(out_lines)
return error_count
except KeyboardInterrupt:
......
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