Commit 0ecad9c0 authored by torne@chromium.org's avatar torne@chromium.org

Presubmit tests: allow 200 columns in .mk files.

The Android WebView code includes several manually-maintained .mk files
that are included by the Android build system. These contain some fairly
long lines as they need to refer to deep pathnames, which means the CQ
cannot be used as it always triggers a presubmit warning.

Allow .mk files to have 200 columns per line instead, which should be
enough for the long paths that are used. Add a test case for this.

BUG=


Review URL: https://chromiumcodereview.appspot.com/12252067

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@182733 0039d316-1c4b-4281-b951-d872f2087c98
parent 1100c91a
......@@ -318,6 +318,8 @@ def CheckLongLines(input_api, output_api, maxlen=80, source_file_filter=None):
"""
maxlens = {
'java': 100,
# This is specifically for Android's handwritten makefiles (Android.mk).
'mk': 200,
'': maxlen,
}
# Note: these are C++ specific but processed on all languages. :(
......
......@@ -1834,6 +1834,11 @@ class CannedChecksUnittest(PresubmitTestsBase):
'importSomething ' + 'A ' * 50, 'foo.java',
presubmit.OutputApi.PresubmitPromptWarning)
def testCannedCheckMakefileLongLines(self):
check = lambda x, y, _: presubmit_canned_checks.CheckLongLines(x, y)
self.ContentTest(check, 'A ' * 100, 'foo.mk', 'A ' * 100 + 'B', 'foo.mk',
presubmit.OutputApi.PresubmitPromptWarning)
def testCannedCheckLongLinesLF(self):
check = lambda x, y, z: presubmit_canned_checks.CheckLongLines(x, y, 10, z)
self.ContentTest(check, '012345678\n', None, '0123456789\n', None,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment