Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # This program is free software; you can redistribute it and/or modify it under | 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 | 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 | 4 # Foundation; either version 2 of the License, or (at your option) any later |
| 5 # version. | 5 # version. |
| 6 # | 6 # |
| 7 # This program is distributed in the hope that it will be useful, but WITHOUT | 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 | 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 | 9 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details |
| 10 # | 10 # |
| 11 # You should have received a copy of the GNU General Public License along with | 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., | 12 # this program; if not, write to the Free Software Foundation, Inc., |
| 13 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 13 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 14 """ Copyright (c) 2002-2008 LOGILAB S.A. (Paris, FRANCE). | 14 """ Copyright (c) 2002-2008 LOGILAB S.A. (Paris, FRANCE). |
| 15 http://www.logilab.fr/ -- mailto:contact@logilab.fr | 15 http://www.logilab.fr/ -- mailto:contact@logilab.fr |
| 16 | |
| 17 Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 16 """ | 18 """ |
| 17 import sys | 19 import sys |
| 18 from pylint import lint | 20 from pylint import lint |
| 19 lint.Run(sys.argv[1:]) | 21 |
| 22 args = sys.argv[1:] | |
| 23 | |
| 24 # Add support for a custom mode where arguments are fed line by line on | |
| 25 # stdin. This allows us to get around command line length limitations. | |
| 26 ARGS_ON_STDIN = '--args-on-stdin' | |
| 27 if ARGS_ON_STDIN in args: | |
| 28 args = [arg for arg in args if arg != ARGS_ON_STDIN] | |
| 29 for arg in sys.stdin: | |
| 30 arg = arg.strip() | |
| 31 if arg: | |
|
M-A Ruel
2012/06/22 15:26:41
Do you think empty args are a problem? If not, you
chrisha
2012/06/22 17:05:11
(No, I suppose I'm not really worried about this.)
| |
| 32 args.append(arg) | |
| 33 | |
| 34 lint.Run(args) | |
| OLD | NEW |