Remove files without an extension from the presubmit checks.

This may include Makefile but it's saner to not include it by default

R=dpranke@chromium.org
BUG=
TEST=updated

Review URL: http://codereview.chromium.org/7251002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@90403 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 14 years ago
parent 004fb7182b
commit c33455af29

@ -186,15 +186,16 @@ class InputApi(object):
# File extensions that are considered source files from a style guide
# perspective. Don't modify this list from a presubmit script!
#
# Files without an extension aren't included in the list. If you want to
# filter them as source files, add r"(^|.*?[\\\/])[^.]+$" to the white list.
# Note that ALL CAPS files are black listed in DEFAULT_BLACK_LIST below.
DEFAULT_WHITE_LIST = (
# C++ and friends
r".+\.c$", r".+\.cc$", r".+\.cpp$", r".+\.h$", r".+\.m$", r".+\.mm$",
r".+\.inl$", r".+\.asm$", r".+\.hxx$", r".+\.hpp$", r".+\.s$", r".+\.S$",
# Scripts
r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$",
# No extension at all, note that ALL CAPS files are black listed in
# DEFAULT_BLACK_LIST below.
r"(^|.*?[\\\/])[^.]+$",
# Other
r".+\.java$", r".+\.mk$", r".+\.am$",
)

@ -945,7 +945,6 @@ class InputApiUnittest(PresubmitTestsBase):
],
[
# Expected.
'a/experimental',
'a/experimental.cc',
'a/experimental.S',
],
@ -960,7 +959,6 @@ class InputApiUnittest(PresubmitTestsBase):
],
[
# Expected.
'a/third_party',
'a/third_party.cc',
],
),
@ -970,11 +968,13 @@ class InputApiUnittest(PresubmitTestsBase):
f('a/LOL_FILE/b'),
f('b.c/LOL_FILE'),
f('a/PRESUBMIT.py'),
f('a/FOO.json'),
f('a/FOO.java'),
],
[
# Expected.
'a/LOL_FILE/b',
'a/PRESUBMIT.py',
'a/FOO.java',
],
),
(
@ -995,7 +995,7 @@ class InputApiUnittest(PresubmitTestsBase):
False, None, False)
self.mox.ReplayAll()
self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 22)
self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 21)
self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 9)
for item in files:
results = filter(input_api.FilterSourceFile, item[0])

Loading…
Cancel
Save