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

Unified Diff: blimp/PRESUBMIT.py

Issue 2626423004: Remove all //blimp code. (Closed)
Patch Set: One last(?) `git merge` for good measure. Created 3 years, 11 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 | « blimp/OWNERS ('k') | blimp/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/PRESUBMIT.py
diff --git a/blimp/PRESUBMIT.py b/blimp/PRESUBMIT.py
deleted file mode 100644
index bf66b9a1aa9b8e2072604e7ce690ad28bbd81b7c..0000000000000000000000000000000000000000
--- a/blimp/PRESUBMIT.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 2015 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 blimp.
-
-See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
-for more details about the presubmit API built into depot_tools.
-"""
-
-import re
-
-BLIMP_SOURCE_FILES=(r'^blimp[\\/].*\.(cc|h)$',)
-
-def CheckChangeLintsClean(input_api, output_api):
- source_filter = lambda x: input_api.FilterSourceFile(
- x, white_list=BLIMP_SOURCE_FILES, black_list=None)
-
- return input_api.canned_checks.CheckChangeLintsClean(
- input_api, output_api, source_filter, lint_filters=[], verbose_level=1)
-
-def _NeedsTest(name):
- is_cc = name.endswith('.cc')
- is_test = name.endswith('test.cc')
- is_test_support = name.startswith('blimp/test/support/')
- return is_cc and not is_test and not is_test_support
-
-def CheckNewFilesHaveTests(input_api, output_api):
- unittest_files = set()
- files_needing_unittest = set()
-
- for source_file in input_api.AffectedFiles():
- if source_file.Action() == 'A':
- name = source_file.LocalPath()
- if name.endswith('_unittest.cc'):
- unittest_files.add(name)
- elif _NeedsTest(name):
- files_needing_unittest.add(name)
-
- missing_unittest_files = []
-
- for name in files_needing_unittest:
- unittest_name = re.sub(r'\.cc$', '_unittest.cc', name)
- if unittest_name not in unittest_files:
- missing_unittest_files.append(name)
-
- if missing_unittest_files:
- message = 'The following new files are missing unit tests:'
- return [output_api.PresubmitPromptWarning(message, missing_unittest_files)]
- else:
- return []
-
-def CheckChangeOnUpload(input_api, output_api):
- results = []
- results += CheckChangeLintsClean(input_api, output_api)
- results += CheckNewFilesHaveTests(input_api, output_api)
- return results
« no previous file with comments | « blimp/OWNERS ('k') | blimp/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698