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

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

Issue 2455203002: [Sync] Updating all sync components to use similar presubmit linting logic. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | components/sync/PRESUBMIT.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 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 """Top-level presubmit script for the sync_driver component. 5 """Presubmit script for browser_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
11 import re 11 import re
12 12
13 SYNC_DRIVER_SOURCE_FILES=(r'^components[\\/]sync_driver[\\/].*\.(cc|h)$',) 13 BROWSER_SYNC_SOURCE_FILES = (r'^components[\\/]browser_sync[\\/].*\.(cc|h)$',)
14 14
15 def CheckChangeLintsClean(input_api, output_api): 15 def CheckChangeLintsClean(input_api, output_api):
16 source_filter = lambda x: input_api.FilterSourceFile( 16 source_filter = lambda x: input_api.FilterSourceFile(
17 x, white_list=SYNC_DRIVER_SOURCE_FILES, black_list=None) 17 x, white_list=BROWSER_SYNC_SOURCE_FILES, black_list=None)
18
19 return input_api.canned_checks.CheckChangeLintsClean( 18 return input_api.canned_checks.CheckChangeLintsClean(
20 input_api, output_api, source_filter, lint_filters=[], verbose_level=1) 19 input_api, output_api, source_filter, lint_filters=[], verbose_level=1)
21 20
22 def CheckChangeOnUpload(input_api, output_api): 21 def CheckChanges(input_api, output_api):
23 results = [] 22 results = []
24 results += CheckChangeLintsClean(input_api, output_api) 23 results += CheckChangeLintsClean(input_api, output_api)
24 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
25 return results 25 return results
26
27 def CheckChangeOnUpload(input_api, output_api):
28 return CheckChanges(input_api, output_api)
29
30 def CheckChangeOnCommit(input_api, output_api):
31 return CheckChanges(input_api, output_api)
OLDNEW
« no previous file with comments | « no previous file | components/sync/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698