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

Unified Diff: third_party/pylint.py

Issue 10654002: Pass arguments to pylint child process via a pipe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Addressed nit. Created 8 years, 6 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 | « tests/presubmit_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pylint.py
diff --git a/third_party/pylint.py b/third_party/pylint.py
old mode 100644
new mode 100755
index 1a8207db39731586c24222298237695649cc9047..4aca4b6d9abd73f7a8bc8f991c245dc73baf7252
--- a/third_party/pylint.py
+++ b/third_party/pylint.py
@@ -13,7 +13,19 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
""" Copyright (c) 2002-2008 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr/ -- mailto:contact@logilab.fr
+
+Copyright (c) 2012 The Chromium Authors. All rights reserved.
"""
import sys
from pylint import lint
-lint.Run(sys.argv[1:])
+
+args = sys.argv[1:]
+
+# Add support for a custom mode where arguments are fed line by line on
+# stdin. This allows us to get around command line length limitations.
+ARGS_ON_STDIN = '--args-on-stdin'
+if ARGS_ON_STDIN in args:
+ args = [arg for arg in args if arg != ARGS_ON_STDIN]
+ args.extend(arg.strip() for arg in sys.stdin)
+
+lint.Run(args)
« no previous file with comments | « tests/presubmit_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698