Commit cb5e57ca authored by cmp@chromium.org's avatar cmp@chromium.org

Ensure .mk files aren't included in the tab character check.

R=maruel@chromium.org
TEST=presubmit checks pass

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@131171 0039d316-1c4b-4281-b951-d872f2087c98
parent 1353e9f4
...@@ -271,8 +271,9 @@ def CheckChangeHasNoTabs(input_api, output_api, source_file_filter=None): ...@@ -271,8 +271,9 @@ def CheckChangeHasNoTabs(input_api, output_api, source_file_filter=None):
# It's the default filter. # It's the default filter.
source_file_filter = input_api.FilterSourceFile source_file_filter = input_api.FilterSourceFile
def filter_more(affected_file): def filter_more(affected_file):
return (not input_api.os_path.basename(affected_file.LocalPath()) in basename = input_api.os_path.basename(affected_file.LocalPath())
('Makefile', 'makefile') and return (not (basename in ('Makefile', 'makefile') or
basename.endswith('.mk')) and
source_file_filter(affected_file)) source_file_filter(affected_file))
tabs = _FindNewViolationsOfRule(lambda _, line : '\t' not in line, tabs = _FindNewViolationsOfRule(lambda _, line : '\t' not in line,
......
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