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

Side by Side Diff: ui/PRESUBMIT.py

Issue 1402213002: Moves mandoline/ui/aura to ui/views/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable presubmit Created 5 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 unified diff | Download patch
« no previous file with comments | « mandoline/ui/omnibox/omnibox_application.cc ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ui. 5 """Presubmit script for ui.
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
(...skipping 14 matching lines...) Expand all
25 # return scoped_ptr<T>(foo); 25 # return scoped_ptr<T>(foo);
26 # bar = scoped_ptr<T>(foo); 26 # bar = scoped_ptr<T>(foo);
27 # But allow: 27 # But allow:
28 # return scoped_ptr<T[]>(foo); 28 # return scoped_ptr<T[]>(foo);
29 # bar = scoped_ptr<T[]>(foo); 29 # bar = scoped_ptr<T[]>(foo);
30 if input_api.re.search( 30 if input_api.re.search(
31 r'(=|\breturn)\s*scoped_ptr<[^\[\]>]+>\([^)]+\)', line): 31 r'(=|\breturn)\s*scoped_ptr<[^\[\]>]+>\([^)]+\)', line):
32 errors.append(output_api.PresubmitError( 32 errors.append(output_api.PresubmitError(
33 ('%s:%d uses explicit scoped_ptr constructor. ' + 33 ('%s:%d uses explicit scoped_ptr constructor. ' +
34 'Use make_scoped_ptr() instead.') % (f.LocalPath(), line_number))) 34 'Use make_scoped_ptr() instead.') % (f.LocalPath(), line_number)))
35 # TODO(sky): this incorrectly catches templates. Fix and reenable.
35 # Disallow: 36 # Disallow:
36 # scoped_ptr<T>() 37 # scoped_ptr<T>()
37 if input_api.re.search(r'\bscoped_ptr<.*?>\(\)', line): 38 # if input_api.re.search(r'\bscoped_ptr<.*?>\(\)', line):
38 errors.append(output_api.PresubmitError( 39 # errors.append(output_api.PresubmitError(
39 '%s:%d uses scoped_ptr<T>(). Use nullptr instead.' % 40 # '%s:%d uses scoped_ptr<T>(). Use nullptr instead.' %
40 (f.LocalPath(), line_number))) 41 # (f.LocalPath(), line_number)))
41 return errors 42 return errors
42 43
43 44
44 def CheckChange(input_api, output_api): 45 def CheckChange(input_api, output_api):
45 results = [] 46 results = []
46 results += CheckScopedPtr(input_api, output_api) 47 results += CheckScopedPtr(input_api, output_api)
47 return results 48 return results
48 49
49 50
50 def CheckChangeOnUpload(input_api, output_api): 51 def CheckChangeOnUpload(input_api, output_api):
51 return CheckChange(input_api, output_api) 52 return CheckChange(input_api, output_api)
52 53
53 54
54 def CheckChangeOnCommit(input_api, output_api): 55 def CheckChangeOnCommit(input_api, output_api):
55 return CheckChange(input_api, output_api) 56 return CheckChange(input_api, output_api)
OLDNEW
« no previous file with comments | « mandoline/ui/omnibox/omnibox_application.cc ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698