| Index: presubmit_canned_checks.py
|
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
|
| index 816c7840a4b2bbd290b902853788220337bb9ded..a21770048acc13b4e9d9069a804156086baeddfc 100644
|
| --- a/presubmit_canned_checks.py
|
| +++ b/presubmit_canned_checks.py
|
| @@ -327,11 +327,20 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
|
| # Special java statements.
|
| SPECIAL_JAVA_STARTS = ('package ', 'import ')
|
|
|
| + # Special obj-c statements.
|
| + OBJC_FILE_EXTENSIONS = ('h', 'm', 'mm')
|
| + SPECIAL_OBJC_STARTS = ('#import')
|
| +
|
| def no_long_lines(file_extension, line):
|
| # Allow special java statements to be as long as necessary.
|
| if file_extension == 'java' and line.startswith(SPECIAL_JAVA_STARTS):
|
| return True
|
|
|
| + # Allow special obj-c statements to be as long as necessary.
|
| + if file_extension in OBJC_FILE_EXTENSIONS and\
|
| + line.startswith(SPECIAL_OBJC_STARTS):
|
| + return True
|
| +
|
| file_maxlen = maxlens.get(file_extension, maxlens[''])
|
| # Stupidly long symbols that needs to be worked around if takes 66% of line.
|
| long_symbol = file_maxlen * 2 / 3
|
|
|