Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: PRESUBMIT.py

Issue 802463002: Remove native_client_sdk from the PNG presubmit check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index e141c6bcdc8769d2849774f7a410184ddf29504a..16fc2757e59a93cc777c4e8f61a4315c331294b3 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698