Chromium Code Reviews| Index: presubmit_canned_checks.py |
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py |
| index 8be4f52971c6849d2b7122a4d94fb140a0354dd0..b222fec4e5490dda8f5423b93baf4bc3dd58b447 100644 |
| --- a/presubmit_canned_checks.py |
| +++ b/presubmit_canned_checks.py |
| @@ -358,10 +358,14 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None): |
| if line_len > extra_maxlen: |
| return False |
| - return ( |
| - any((url in line) for url in ('file://', 'http://', 'https://')) or |
| - input_api.re.match( |
| - r'.*[A-Za-z][A-Za-z_0-9]{%d,}.*' % long_symbol, line)) |
| + if any((url in line) for url in ('file://', 'http://', 'https://')): |
| + return True |
| + |
| + if ('url(' in line) and file_extension == 'css': |
|
M-A Ruel
2014/07/28 14:09:05
if 'url(' in line and file_extension == 'css':
Marc Treib
2014/07/28 14:13:47
Done.
|
| + return True |
| + |
| + return input_api.re.match(r'.*[A-Za-z][A-Za-z_0-9]{%d,}.*' % long_symbol, |
|
M-A Ruel
2014/07/28 14:09:05
I highly prefer:
return input_api.re.match(
r'
Marc Treib
2014/07/28 14:13:47
Done.
|
| + line) |
| def format_error(filename, line_num, line): |
| return '%s, line %s, %s chars' % (filename, line_num, len(line)) |