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

Unified Diff: presubmit_canned_checks.py

Issue 13403004: Make maxlen configurable in PanProjectChecks (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 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 f7aa29f90ee541c0d3fa93eb3787a5556b840e3f..e4ce0418c04ff0cc4645d9fbc2ba961710b53666 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -312,7 +312,7 @@ def CheckChangeHasNoStrayWhitespace(input_api, output_api,
return []
-def CheckLongLines(input_api, output_api, maxlen=80, source_file_filter=None):
+def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
"""Checks that there aren't any lines longer than maxlen characters in any of
the text files to be submitted.
"""
@@ -903,7 +903,7 @@ def CheckSingletonInHeaders(input_api, output_api, source_file_filter=None):
def PanProjectChecks(input_api, output_api,
excluded_paths=None, text_files=None,
license_header=None, project_name=None,
- owners_check=True):
+ owners_check=True, maxlen=80):
"""Checks that ALL chromium orbit projects should use.
These are checks to be run on all Chromium orbit project, including:
@@ -975,7 +975,7 @@ def PanProjectChecks(input_api, output_api,
snapshot("checking long lines")
results.extend(input_api.canned_checks.CheckLongLines(
- input_api, output_api, source_file_filter=sources))
+ input_api, output_api, maxlen, source_file_filter=sources))
snapshot( "checking tabs")
results.extend(input_api.canned_checks.CheckChangeHasNoTabs(
input_api, output_api, source_file_filter=sources))
« 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