blob: bf1860bb30239072223438428e8fbc0ceec3a149 [file] [log] [blame]
[email protected]267d6592012-06-19 19:23:311#!/usr/bin/env python
2# This program is free software; you can redistribute it and/or modify it under
3# the terms of the GNU General Public License as published by the Free Software
4# Foundation; either version 2 of the License, or (at your option) any later
5# version.
6#
7# This program is distributed in the hope that it will be useful, but WITHOUT
8# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
10#
11# You should have received a copy of the GNU General Public License along with
12# this program; if not, write to the Free Software Foundation, Inc.,
13# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
14""" Copyright (c) 2002-2008 LOGILAB S.A. (Paris, FRANCE).
15http://www.logilab.fr/ -- mailto:[email protected]
[email protected]1b129e52012-06-22 17:08:1116
17Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]267d6592012-06-19 19:23:3118"""
[email protected]e3b32af2014-11-20 22:41:0719import os
[email protected]267d6592012-06-19 19:23:3120import sys
[email protected]e3b32af2014-11-20 22:41:0721
22# Add local modules to the search path.
23sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(
24 __file__)), 'logilab'))
25
[email protected]267d6592012-06-19 19:23:3126from pylint import lint
[email protected]1b129e52012-06-22 17:08:1127
28args = sys.argv[1:]
29
30# Add support for a custom mode where arguments are fed line by line on
31# stdin. This allows us to get around command line length limitations.
32ARGS_ON_STDIN = '--args-on-stdin'
33if ARGS_ON_STDIN in args:
34 args = [arg for arg in args if arg != ARGS_ON_STDIN]
35 args.extend(arg.strip() for arg in sys.stdin)
36
37lint.Run(args)