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

Side by Side Diff: third_party/PRESUBMIT.py

Issue 1476893004: Remove the presubmit warning when changing code in third_party/mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 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 ANDROID_WHITELISTED_LICENSES = [ 5 ANDROID_WHITELISTED_LICENSES = [
6 'A(pple )?PSL 2(\.0)?', 6 'A(pple )?PSL 2(\.0)?',
7 'Apache( Version)? 2(\.0)?', 7 'Apache( Version)? 2(\.0)?',
8 '(New )?([23]-Clause )?BSD( [23]-Clause)?( with advertising clause)?', 8 '(New )?([23]-Clause )?BSD( [23]-Clause)?( with advertising clause)?',
9 'L?GPL ?v?2(\.[01])?( or later)?', 9 'L?GPL ?v?2(\.[01])?( or later)?',
10 'MIT(/X11)?(-like)?', 10 'MIT(/X11)?(-like)?',
(...skipping 28 matching lines...) Expand all
39 files = [] 39 files = []
40 errors = [] 40 errors = []
41 for f in input_api.AffectedFiles(): 41 for f in input_api.AffectedFiles():
42 local_path = f.LocalPath() 42 local_path = f.LocalPath()
43 if input_api.os_path.dirname(local_path) == 'third_party': 43 if input_api.os_path.dirname(local_path) == 'third_party':
44 continue 44 continue
45 if (local_path.startswith('third_party' + input_api.os_path.sep) and 45 if (local_path.startswith('third_party' + input_api.os_path.sep) and
46 not local_path.startswith('third_party' + input_api.os_path.sep + 46 not local_path.startswith('third_party' + input_api.os_path.sep +
47 'WebKit' + input_api.os_path.sep) and 47 'WebKit' + input_api.os_path.sep) and
48 not local_path.startswith('third_party' + input_api.os_path.sep + 48 not local_path.startswith('third_party' + input_api.os_path.sep +
49 'mojo' + input_api.os_path.sep) and
50 not local_path.startswith('third_party' + input_api.os_path.sep +
49 'boringssl' + input_api.os_path.sep)): 51 'boringssl' + input_api.os_path.sep)):
50 files.append(f) 52 files.append(f)
51 if local_path.endswith("README.chromium"): 53 if local_path.endswith("README.chromium"):
52 readmes.append(f) 54 readmes.append(f)
53 if files and not readmes: 55 if files and not readmes:
54 errors.append(output_api.PresubmitPromptWarning( 56 errors.append(output_api.PresubmitPromptWarning(
55 'When updating or adding third party code the appropriate\n' 57 'When updating or adding third party code the appropriate\n'
56 '\'README.chromium\' file should also be updated with the correct\n' 58 '\'README.chromium\' file should also be updated with the correct\n'
57 'version and package information.', files)) 59 'version and package information.', files))
58 if not readmes: 60 if not readmes:
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 if 'D' not in f.Action(): 130 if 'D' not in f.Action():
129 errors.append(output_api.PresubmitError( 131 errors.append(output_api.PresubmitError(
130 'Third party README should only be removed when the whole\n' 132 'Third party README should only be removed when the whole\n'
131 'directory is being removed.\n', [f, affected_file])) 133 'directory is being removed.\n', [f, affected_file]))
132 134
133 135
134 def CheckChangeOnUpload(input_api, output_api): 136 def CheckChangeOnUpload(input_api, output_api):
135 results = [] 137 results = []
136 results.extend(_CheckThirdPartyReadmesUpdated(input_api, output_api)) 138 results.extend(_CheckThirdPartyReadmesUpdated(input_api, output_api))
137 return results 139 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698