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

Unified Diff: presubmit_canned_checks.py

Issue 1033363002: Remove 150% hard line length limit for long URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 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 | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 49ed07c6f853592116aba2a1366cc4b3ec6c61ee..bba7737284127cceb244d60255f6bee10c4244c6 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -368,12 +368,13 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
if line_len <= file_maxlen:
return True
- if line_len > extra_maxlen:
- return False
-
+ # Allow long URLs of any length.
if any((url in line) for url in ('file://', 'http://', 'https://')):
return True
+ if line_len > extra_maxlen:
+ return False
+
if 'url(' in line and file_extension == 'css':
return True
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698