Add mojom and fidl files to DEFAULT_WHITE_LIST

This will allow to ensure that fidl and mojom files have proper
copyright header.

Bug: 831384
Change-Id: I5e41bbf27f2e3f2c6749a52de7463d651d033b81
Reviewed-on: https://chromium-review.googlesource.com/1036606
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
changes/06/1036606/2
Sergey Ulanov 7 years ago committed by Commit Bot
parent 43d72759fe
commit 166bc4ceed

@ -507,7 +507,8 @@ class InputApi(object):
# Scripts # Scripts
r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$", r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$",
# Other # Other
r".+\.java$", r".+\.mk$", r".+\.am$", r".+\.css$" r".+\.java$", r".+\.mk$", r".+\.am$", r".+\.css$", r".+\.mojom$",
r".+\.fidl$"
) )
# Path regexp that should be excluded from being considered containing source # Path regexp that should be excluded from being considered containing source

@ -1159,11 +1159,13 @@ class InputApiUnittest(PresubmitTestsBase):
f('a/PRESUBMIT.py'), f('a/PRESUBMIT.py'),
f('a/FOO.json'), f('a/FOO.json'),
f('a/FOO.java'), f('a/FOO.java'),
f('a/FOO.mojom'),
], ],
[ [
# Expected. # Expected.
'a/PRESUBMIT.py', 'a/PRESUBMIT.py',
'a/FOO.java', 'a/FOO.java',
'a/FOO.mojom',
], ],
), ),
( (
@ -1185,7 +1187,7 @@ class InputApiUnittest(PresubmitTestsBase):
self.fake_change, './PRESUBMIT.py', False, None, False) self.fake_change, './PRESUBMIT.py', False, None, False)
self.mox.ReplayAll() self.mox.ReplayAll()
self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 22) self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 24)
self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 12) self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 12)
for item in files: for item in files:
results = filter(input_api.FilterSourceFile, item[0]) results = filter(input_api.FilterSourceFile, item[0])

Loading…
Cancel
Save