mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[Presubmit] Fixes presubmit for breaking API change.
The API change happened in: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2079411 Change-Id: I1c826f102c1366c193a75fb5e17a355dad34cbc3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137977 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Clement Skau <cskau@google.com>
This commit is contained in:
parent
fdca1f3178
commit
e1ef16d73a
|
@ -59,10 +59,11 @@ def CheckFormatted(input_api, output_api):
|
|||
def convert_warning_to_error(presubmit_result):
|
||||
if not presubmit_result.fatal:
|
||||
# Convert this warning to an error.
|
||||
stream = StringIO.StringIO()
|
||||
presubmit_result.handle(stream)
|
||||
message = stream.getvalue()
|
||||
return output_api.PresubmitError(message)
|
||||
result_json = presubmit_result.json_format()
|
||||
return output_api.PresubmitError(
|
||||
message=result_json['message'],
|
||||
items=result_json['items'],
|
||||
long_text=result_json['long_text'])
|
||||
return presubmit_result
|
||||
|
||||
results = input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
|
||||
|
|
Loading…
Reference in a new issue