Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: components/sync/PRESUBMIT.py

Issue 2680413002: Turn on clang format as an upload step for all the repo. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Presubmit script for sync component. 5 """Presubmit script for sync component.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 def CheckChangeLintsClean(input_api, output_api): 370 def CheckChangeLintsClean(input_api, output_api):
371 source_filter = lambda x: input_api.FilterSourceFile( 371 source_filter = lambda x: input_api.FilterSourceFile(
372 x, white_list=SYNC_SOURCE_FILES, black_list=None) 372 x, white_list=SYNC_SOURCE_FILES, black_list=None)
373 return input_api.canned_checks.CheckChangeLintsClean( 373 return input_api.canned_checks.CheckChangeLintsClean(
374 input_api, output_api, source_filter, lint_filters=LINT_FILTERS, 374 input_api, output_api, source_filter, lint_filters=LINT_FILTERS,
375 verbose_level=1) 375 verbose_level=1)
376 376
377 def CheckChanges(input_api, output_api): 377 def CheckChanges(input_api, output_api):
378 results = [] 378 results = []
379 results += CheckChangeLintsClean(input_api, output_api) 379 results += CheckChangeLintsClean(input_api, output_api)
380 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
381 for f in input_api.AffectedFiles(): 380 for f in input_api.AffectedFiles():
382 if f.LocalPath().endswith(MODEL_TYPE_FILE_NAME): 381 if f.LocalPath().endswith(MODEL_TYPE_FILE_NAME):
383 return CheckModelTypeInfoMap(input_api, output_api, f) 382 return CheckModelTypeInfoMap(input_api, output_api, f)
384 return results 383 return results
385 384
386 def CheckChangeOnUpload(input_api, output_api): 385 def CheckChangeOnUpload(input_api, output_api):
387 return CheckChanges(input_api, output_api) 386 return CheckChanges(input_api, output_api)
388 387
389 def CheckChangeOnCommit(input_api, output_api): 388 def CheckChangeOnCommit(input_api, output_api):
390 return CheckChanges(input_api, output_api) 389 return CheckChanges(input_api, output_api)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698