Index: cc/PRESUBMIT.py |
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py |
index daa5246dc694d981479003778217384afba458c6..96cc17197215b354376d61dfe9f9b2d97ae9cd83 100644 |
--- a/cc/PRESUBMIT.py |
+++ b/cc/PRESUBMIT.py |
@@ -9,7 +9,6 @@ details on the presubmit API built into gcl. |
""" |
import re |
-import string |
CC_SOURCE_FILES=(r'^cc/.*\.(cc|h)$',) |
@@ -102,41 +101,6 @@ def CheckStdAbs(input_api, output_api, |
items=missing_std_prefix_files)) |
return result |
-def CheckPassByValue(input_api, |
enne (OOO)
2014/01/02 18:42:56
The presubmit here was nice because it communicate
|
- output_api, |
- white_list=CC_SOURCE_FILES, |
- black_list=None): |
- black_list = tuple(black_list or input_api.DEFAULT_BLACK_LIST) |
- source_file_filter = lambda x: input_api.FilterSourceFile(x, |
- white_list, |
- black_list) |
- |
- local_errors = [] |
- |
- # Well-defined simple classes containing only <= 4 ints, or <= 2 floats. |
- pass_by_value_types = ['base::Time', |
- 'base::TimeTicks', |
- 'gfx::Point', |
- 'gfx::PointF', |
- 'gfx::Rect', |
- 'gfx::Size', |
- 'gfx::SizeF', |
- 'gfx::Vector2d', |
- 'gfx::Vector2dF', |
- ] |
- |
- for f in input_api.AffectedSourceFiles(source_file_filter): |
- contents = input_api.ReadFile(f, 'rb') |
- match = re.search( |
- r'\bconst +' + '(?P<type>(%s))&' % |
- string.join(pass_by_value_types, '|'), |
- contents) |
- if match: |
- local_errors.append(output_api.PresubmitError( |
- '%s passes %s by const ref instead of by value.' % |
- (f.LocalPath(), match.group('type')))) |
- return local_errors |
- |
def CheckTodos(input_api, output_api): |
errors = [] |
@@ -157,7 +121,6 @@ def CheckChangeOnUpload(input_api, output_api): |
results = [] |
results += CheckAsserts(input_api, output_api) |
results += CheckStdAbs(input_api, output_api) |
- results += CheckPassByValue(input_api, output_api) |
results += CheckChangeLintsClean(input_api, output_api) |
results += CheckTodos(input_api, output_api) |
return results |