Commit 166bc4ce authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

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/1036606Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
parent 43d72759
......@@ -507,7 +507,8 @@ class InputApi(object):
# Scripts
r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$",
# 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
......
......@@ -1159,11 +1159,13 @@ class InputApiUnittest(PresubmitTestsBase):
f('a/PRESUBMIT.py'),
f('a/FOO.json'),
f('a/FOO.java'),
f('a/FOO.mojom'),
],
[
# Expected.
'a/PRESUBMIT.py',
'a/FOO.java',
'a/FOO.mojom',
],
),
(
......@@ -1185,7 +1187,7 @@ class InputApiUnittest(PresubmitTestsBase):
self.fake_change, './PRESUBMIT.py', False, None, False)
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)
for item in files:
results = filter(input_api.FilterSourceFile, item[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment