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

Unified Diff: pylint.py

Issue 10447014: Add pylint to depot_tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix unittests. 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 | « pylint ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylint.py
diff --git a/pylint.py b/pylint.py
new file mode 100644
index 0000000000000000000000000000000000000000..9caa3a37110e19e8c0a435a2db78c3939513a310
--- /dev/null
+++ b/pylint.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""A wrapper script for using pylint from the command line."""
+
+import os
+import subprocess
+import sys
+
+
+_HERE = os.path.dirname(os.path.abspath(__file__))
+_PYLINT = os.path.join(_HERE, 'third_party', 'pylint.py')
+_RC_FILE = os.path.join(_HERE, 'pylintrc')
+
+
+# Run pylint. We prepend the command-line with the depot_tools rcfile. If
+# another rcfile is to be used, passing --rcfile a second time on the command-
+# line will work fine.
+command = [sys.executable, _PYLINT, '--rcfile=%s' % _RC_FILE] + sys.argv[1:]
+sys.exit(subprocess.call(command))
« no previous file with comments | « pylint ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698