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

Unified Diff: components/sync_bookmarks/PRESUBMIT.py

Issue 2455203002: [Sync] Updating all sync components to use similar presubmit linting logic. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/PRESUBMIT.py ('k') | components/sync_sessions/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_bookmarks/PRESUBMIT.py
diff --git a/components/sync/driver/PRESUBMIT.py b/components/sync_bookmarks/PRESUBMIT.py
similarity index 55%
rename from components/sync/driver/PRESUBMIT.py
rename to components/sync_bookmarks/PRESUBMIT.py
index 20db5fcceaf23d708c1cd08217586cf56458c26b..33378623fd64e29efa4da0858d449b9f1c54f4ae 100644
--- a/components/sync/driver/PRESUBMIT.py
+++ b/components/sync_bookmarks/PRESUBMIT.py
@@ -1,8 +1,8 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
+# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Top-level presubmit script for the sync_driver component.
+"""Presubmit script for sync_bookmarks component.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
@@ -10,16 +10,23 @@ for more details about the presubmit API built into depot_tools.
import re
-SYNC_DRIVER_SOURCE_FILES=(r'^components[\\/]sync_driver[\\/].*\.(cc|h)$',)
+SYNC_BOOKMARKS_SOURCE_FILES = (
+ r'^components[\\/]sync_bookmarks[\\/].*\.(cc|h)$',)
def CheckChangeLintsClean(input_api, output_api):
source_filter = lambda x: input_api.FilterSourceFile(
- x, white_list=SYNC_DRIVER_SOURCE_FILES, black_list=None)
-
+ x, white_list=SYNC_BOOKMARKS_SOURCE_FILES, black_list=None)
return input_api.canned_checks.CheckChangeLintsClean(
input_api, output_api, source_filter, lint_filters=[], verbose_level=1)
-def CheckChangeOnUpload(input_api, output_api):
+def CheckChanges(input_api, output_api):
results = []
results += CheckChangeLintsClean(input_api, output_api)
+ results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
return results
+
+def CheckChangeOnUpload(input_api, output_api):
+ return CheckChanges(input_api, output_api)
+
+def CheckChangeOnCommit(input_api, output_api):
+ return CheckChanges(input_api, output_api)
« no previous file with comments | « components/sync/driver/PRESUBMIT.py ('k') | components/sync_sessions/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698