.gn files in the API directories are part of the API too...
...since we can break users by changing the build targets they're using. BUG=webrtc:8445 Change-Id: Iaa549ce9802bd99639d8b966807ae2db43e7f14b Reviewed-on: https://webrtc-review.googlesource.com/16460 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20471}
This commit is contained in:
parent
c7b18fef19
commit
6bfac0383f
25
PRESUBMIT.py
25
PRESUBMIT.py
@ -157,18 +157,19 @@ Related files:
|
||||
def CheckNativeApiHeaderChanges(input_api, output_api):
|
||||
"""Checks to remind proper changing of native APIs."""
|
||||
files = []
|
||||
for f in input_api.AffectedSourceFiles(input_api.FilterSourceFile):
|
||||
if f.LocalPath().endswith('.h'):
|
||||
for path in API_DIRS:
|
||||
dn = os.path.dirname(f.LocalPath())
|
||||
if path == 'api':
|
||||
# Special case: Subdirectories included.
|
||||
if dn == 'api' or dn.startswith('api/'):
|
||||
files.append(f)
|
||||
else:
|
||||
# Normal case: Subdirectories not included.
|
||||
if dn == path:
|
||||
files.append(f)
|
||||
source_file_filter = lambda x: input_api.FilterSourceFile(
|
||||
x, white_list=[r'.+\.(gn|gni|h)$'])
|
||||
for f in input_api.AffectedSourceFiles(source_file_filter):
|
||||
for path in API_DIRS:
|
||||
dn = os.path.dirname(f.LocalPath())
|
||||
if path == 'api':
|
||||
# Special case: Subdirectories included.
|
||||
if dn == 'api' or dn.startswith('api/'):
|
||||
files.append(f)
|
||||
else:
|
||||
# Normal case: Subdirectories not included.
|
||||
if dn == path:
|
||||
files.append(f)
|
||||
|
||||
if files:
|
||||
return [output_api.PresubmitNotifyResult(API_CHANGE_MSG, files)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user