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

Unified Diff: presubmit_canned_checks.py

Issue 6755007: Relax |const NSClass*| PRESUBMIT check to not detect false positives (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 9 years, 9 months 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_canned_checks.py
===================================================================
--- presubmit_canned_checks.py (revision 79561)
+++ presubmit_canned_checks.py (working copy)
@@ -724,11 +724,12 @@
def _CheckConstNSObject(input_api, output_api, source_file_filter):
"""Checks to make sure no objective-c files have |const NSSomeClass*|."""
- pattern = input_api.re.compile(r'const\s+NS\w*\s*\*')
+ pattern = input_api.re.compile(
+ r'const\s+NS(?!(Point|Range|Rect|Size)\s*\*)\w*\s*\*')
def objective_c_filter(f):
return (source_file_filter(f) and
- input_api.os_path.splitext(f.LocalPath())[1] in ('.h', '.mm'))
+ input_api.os_path.splitext(f.LocalPath())[1] in ('.h', '.m', '.mm'))
files = []
for f in input_api.AffectedSourceFiles(objective_c_filter):
« 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