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

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

Issue 2662453008: [Sync] Fix sync lint errors/includes, update presubmit. (Closed)
Patch Set: Rebase 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_bookmarks component. 5 """Presubmit script for sync_bookmarks 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_BOOKMARKS_SOURCE_FILES = ( 13 SYNC_BOOKMARKS_SOURCE_FILES = (
14 r'^components[\\/]sync_bookmarks[\\/].*\.(cc|h)$',) 14 r'^components[\\/]sync_bookmarks[\\/].*\.(cc|h)$',)
15 15
16 # The wrapper around lint that is called below disables a set of filters if the
17 # passed filter evaluates to false. Pass a junk filter to avoid this behavior.
18 LINT_FILTERS = ['+fake/filter']
19
16 def CheckChangeLintsClean(input_api, output_api): 20 def CheckChangeLintsClean(input_api, output_api):
17 source_filter = lambda x: input_api.FilterSourceFile( 21 source_filter = lambda x: input_api.FilterSourceFile(
18 x, white_list=SYNC_BOOKMARKS_SOURCE_FILES, black_list=None) 22 x, white_list=SYNC_BOOKMARKS_SOURCE_FILES, black_list=None)
19 return input_api.canned_checks.CheckChangeLintsClean( 23 return input_api.canned_checks.CheckChangeLintsClean(
20 input_api, output_api, source_filter, lint_filters=[], verbose_level=1) 24 input_api, output_api, source_filter, lint_filters=LINT_FILTERS,
25 verbose_level=1)
21 26
22 def CheckChanges(input_api, output_api): 27 def CheckChanges(input_api, output_api):
23 results = [] 28 results = []
24 results += CheckChangeLintsClean(input_api, output_api) 29 results += CheckChangeLintsClean(input_api, output_api)
25 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) 30 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
26 return results 31 return results
27 32
28 def CheckChangeOnUpload(input_api, output_api): 33 def CheckChangeOnUpload(input_api, output_api):
29 return CheckChanges(input_api, output_api) 34 return CheckChanges(input_api, output_api)
30 35
31 def CheckChangeOnCommit(input_api, output_api): 36 def CheckChangeOnCommit(input_api, output_api):
32 return CheckChanges(input_api, output_api) 37 return CheckChanges(input_api, output_api)
OLDNEW
« no previous file with comments | « components/sync/protocol/proto_value_conversions.cc ('k') | components/sync_sessions/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698