Chromium Code Reviews| Index: presubmit_canned_checks.py |
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py |
| index b8cbd94d33102ae27c9db27b1ed87dce3bb00f35..14c5a1b37f8e00f2ff8f94c14f46d68330b470ab 100755 |
| --- a/presubmit_canned_checks.py |
| +++ b/presubmit_canned_checks.py |
| @@ -98,7 +98,16 @@ def CheckLongLines(input_api, output_api, maxlen=80): |
| """ |
| bad = [] |
| for f, line_num, line in input_api.RightHandSideLines(): |
| - if len(line) > maxlen: |
| + # Allow lines with http://, https:// and #define/#pragma/#include/#if/#endif |
| + # to exceed the maxlen rule. |
| + if (len(line) > maxlen and |
| + not 'http://' in line and |
|
Jói Sigurðsson
2009/06/09 01:39:16
a regexp combining all of these cases would be fas
M-A Ruel
2009/06/09 01:44:37
Yes it's slightly verbose but I thought it was mor
|
| + not 'https://' in line and |
| + not line.startswith('#define') and |
| + not line.startswith('#include') and |
| + not line.startswith('#pragma') and |
| + not line.startswith('#if') and |
| + not line.startswith('#endif')): |
| bad.append( |
| '%s, line %s, %s chars' % |
| (f.LocalPath(), line_num, len(line))) |