Commit 0dcdf34d authored by binji's avatar binji Committed by Commit bot

Remove native_client_sdk from the PNG presubmit check

The native_client_sdk directory contains auto-generated documentation that
includes PNGs that are flagged by the presubmit check. These PNGs are not used
by Chrome, so they should be ignored by the check.

BUG=150046
R=phajdan.jr@chromium.org

Review URL: https://codereview.chromium.org/802463002

Cr-Commit-Position: refs/heads/master@{#308125}
parent decf4361
......@@ -862,12 +862,17 @@ def _CheckHardcodedGoogleHostsInLowerLayers(input_api, output_api):
def _CheckNoAbbreviationInPngFileName(input_api, output_api):
"""Makes sure there are no abbreviations in the name of PNG files.
The native_client_sdk directory is excluded because it has auto-generated PNG
files for documentation.
"""
pattern = input_api.re.compile(r'.*_[a-z]_.*\.png$|.*_[a-z]\.png$')
errors = []
for f in input_api.AffectedFiles(include_deletes=False):
if pattern.match(f.LocalPath()):
errors.append(' %s' % f.LocalPath())
white_list = (r'.*_[a-z]_.*\.png$|.*_[a-z]\.png$',)
black_list = (r'^native_client_sdk[\\\/]',)
file_filter = lambda f: input_api.FilterSourceFile(
f, white_list=white_list, black_list=black_list)
for f in input_api.AffectedFiles(include_deletes=False,
file_filter=file_filter):
errors.append(' %s' % f.LocalPath())
results = []
if errors:
......
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