Add format check to git cl presubmit

Since the whole base code has been reformated,
the check based on a dry-run of `git cl format` becomes relevant.

If any formatting issue is detected, a warning will invite the user
to run `git cl format`.

Bug: webrtc:9340
Change-Id: Iabf87fd46ae8bf87d65cac92ae43e4e89b0a2796
Reviewed-on: https://webrtc-review.googlesource.com/84400
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23687}
This commit is contained in:
Yves Gerey 2018-06-20 15:51:49 +02:00 committed by Commit Bot
parent beb2d9813c
commit 87a9353cc9

View file

@ -809,6 +809,8 @@ def CommonChecks(input_api, output_api):
input_api, output_api))
results.extend(input_api.canned_checks.CheckChangeTodoHasOwner(
input_api, output_api, source_file_filter=non_third_party_sources))
results.extend(input_api.canned_checks.CheckPatchFormatted(
input_api, output_api))
results.extend(CheckNativeApiHeaderChanges(input_api, output_api))
results.extend(CheckNoIOStreamInHeaders(
input_api, output_api, source_file_filter=non_third_party_sources))