[email protected] | 267d659 | 2012-06-19 19:23:31 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | """A wrapper script for using pylint from the command line.""" |
| 7 | |
| 8 | import os |
| 9 | import subprocess |
| 10 | import sys |
| 11 | |
| 12 | |
| 13 | _HERE = os.path.dirname(os.path.abspath(__file__)) |
| 14 | _PYLINT = os.path.join(_HERE, 'third_party', 'pylint.py') |
| 15 | _RC_FILE = os.path.join(_HERE, 'pylintrc') |
| 16 | |
| 17 | |
| 18 | # Run pylint. We prepend the command-line with the depot_tools rcfile. If |
| 19 | # another rcfile is to be used, passing --rcfile a second time on the command- |
| 20 | # line will work fine. |
| 21 | command = [sys.executable, _PYLINT, '--rcfile=%s' % _RC_FILE] + sys.argv[1:] |
| 22 | sys.exit(subprocess.call(command)) |