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

Side by Side Diff: components/sync_sessions/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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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_sessions component. 5 """Presubmit script for sync_sessions 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_SESSIONS_SOURCE_FILES = (r'^components[\\/]sync_sessions[\\/].*\.(cc|h)$',) 13 SYNC_SESSIONS_SOURCE_FILES = (r'^components[\\/]sync_sessions[\\/].*\.(cc|h)$',)
14 14
15 # The wrapper around lint that is called below disables a set of filters if the
16 # passed filter evaluates to false. Pass a junk filter to avoid this behavior.
17 LINT_FILTERS = ['+fake/filter']
18
15 def CheckChangeLintsClean(input_api, output_api): 19 def CheckChangeLintsClean(input_api, output_api):
16 source_filter = lambda x: input_api.FilterSourceFile( 20 source_filter = lambda x: input_api.FilterSourceFile(
17 x, white_list=SYNC_SESSIONS_SOURCE_FILES, black_list=None) 21 x, white_list=SYNC_SESSIONS_SOURCE_FILES, black_list=None)
18 return input_api.canned_checks.CheckChangeLintsClean( 22 return input_api.canned_checks.CheckChangeLintsClean(
19 input_api, output_api, source_filter, lint_filters=[], verbose_level=1) 23 input_api, output_api, source_filter, lint_filters=LINT_FILTERS,
24 verbose_level=1)
20 25
21 def CheckChanges(input_api, output_api): 26 def CheckChanges(input_api, output_api):
22 results = [] 27 results = []
23 results += CheckChangeLintsClean(input_api, output_api) 28 results += CheckChangeLintsClean(input_api, output_api)
24 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) 29 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
25 return results 30 return results
26 31
27 def CheckChangeOnUpload(input_api, output_api): 32 def CheckChangeOnUpload(input_api, output_api):
28 return CheckChanges(input_api, output_api) 33 return CheckChanges(input_api, output_api)
29 34
30 def CheckChangeOnCommit(input_api, output_api): 35 def CheckChangeOnCommit(input_api, output_api):
31 return CheckChanges(input_api, output_api) 36 return CheckChanges(input_api, output_api)
OLDNEW
« no previous file with comments | « components/sync_bookmarks/PRESUBMIT.py ('k') | components/sync_sessions/revisit/page_revisit_broadcaster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698