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

Side by Side Diff: mojo/PRESUBMIT.py

Issue 1412733002: C++ bindings: separate out serialization source set, have "mojom" targets optionally use serializat… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: address comments from previous patch Created 5 years, 1 month 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 | « examples/serialization/serialization.mojom ('k') | mojo/public/cpp/bindings/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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 mojo 5 """Presubmit script for mojo
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 def _CheckSourceSetsAreOfCorrectType(input_api, output_api, package): 187 def _CheckSourceSetsAreOfCorrectType(input_api, output_api, package):
188 """Makes sure that the BUILD.gn files always use the correct wrapper type for 188 """Makes sure that the BUILD.gn files always use the correct wrapper type for
189 |package|, which can be one of ["SDK", "EDK"], to construct source_set 189 |package|, which can be one of ["SDK", "EDK"], to construct source_set
190 targets.""" 190 targets."""
191 assert package in _PACKAGE_SOURCE_SET_TYPES 191 assert package in _PACKAGE_SOURCE_SET_TYPES
192 required_source_set_type = _PACKAGE_SOURCE_SET_TYPES[package] 192 required_source_set_type = _PACKAGE_SOURCE_SET_TYPES[package]
193 193
194 problems = [] 194 problems = []
195 for f in _AffectedBuildFilesWithinPackage(input_api, package): 195 for f in _AffectedBuildFilesWithinPackage(input_api, package):
196 if f.LocalPath() == "mojo/public/tools/bindings/mojom.gni":
197 continue
196 for line_num, line in f.ChangedContents(): 198 for line_num, line in f.ChangedContents():
197 m = re.search(r"[a-z_]*source_set\(", line) 199 m = re.search(r"[a-z_]*source_set\(", line)
198 if not m: 200 if not m:
199 continue 201 continue
200 source_set_type = m.group(0)[:-1] 202 source_set_type = m.group(0)[:-1]
201 if source_set_type in required_source_set_type: 203 if source_set_type in required_source_set_type:
202 continue 204 continue
203 problems.append(_IncorrectSourceSetTypeWarningItem(f.LocalPath(), 205 problems.append(_IncorrectSourceSetTypeWarningItem(f.LocalPath(),
204 line_num)) 206 line_num))
205 207
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 def CheckChangeOnUpload(input_api, output_api): 280 def CheckChangeOnUpload(input_api, output_api):
279 results = [] 281 results = []
280 results.extend(_CommonChecks(input_api, output_api)) 282 results.extend(_CommonChecks(input_api, output_api))
281 results.extend(_CheckChangePylintsClean(input_api, output_api)) 283 results.extend(_CheckChangePylintsClean(input_api, output_api))
282 return results 284 return results
283 285
284 def CheckChangeOnCommit(input_api, output_api): 286 def CheckChangeOnCommit(input_api, output_api):
285 results = [] 287 results = []
286 results.extend(_CommonChecks(input_api, output_api)) 288 results.extend(_CommonChecks(input_api, output_api))
287 return results 289 return results
OLDNEW
« no previous file with comments | « examples/serialization/serialization.mojom ('k') | mojo/public/cpp/bindings/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698