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

Issue 10447014: Add pylint to depot_tools. (Closed)

Created:
8 years, 7 months ago by chrisha
Modified:
8 years, 6 months ago
Reviewers:
M-A Ruel, scottmg
CC:
chromium-reviews
Visibility:
Public.

Description

Add pylint to depot_tools. This CL adds pylint (and its dependencies) to third_party. It plumbs them into presubmit_canned_checks, and exposes a command-line tool to access pylint. BUG= TEST= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=143016

Patch Set 1 : . #

Patch Set 2 : Run pylint in subprocess rather than importing. #

Total comments: 2

Patch Set 3 : Fixed unittest. #

Patch Set 4 : Copy sys.path to pylint env. #

Patch Set 5 : Fix unittests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29369 lines, -887 lines) Patch
M .gitignore View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
A bootstrap/win/pylint.new.bat View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M bootstrap/win/win_tools.bat View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
D package_management.py View 1 2 3 4 1 chunk +0 lines, -602 lines 0 comments Download
M presubmit_canned_checks.py View 1 2 3 4 3 chunks +37 lines, -54 lines 0 comments Download
A + pylint View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
A pylint.py View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
M tests/presubmit_unittest.py View 1 2 3 4 2 chunks +8 lines, -6 lines 0 comments Download
A third_party/logilab/README.chromium View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/logilab/__init__.py View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/logilab/astng/LICENSE.txt View 1 2 3 4 1 chunk +340 lines, -0 lines 0 comments Download
A third_party/logilab/astng/README.chromium View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/logilab/astng/__init__.py View 1 2 3 4 1 chunk +73 lines, -0 lines 0 comments Download
A third_party/logilab/astng/__pkginfo__.py View 1 2 3 4 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/logilab/astng/as_string.py View 1 2 3 4 1 chunk +427 lines, -0 lines 0 comments Download
A third_party/logilab/astng/bases.py View 1 2 3 4 1 chunk +629 lines, -0 lines 0 comments Download
A third_party/logilab/astng/builder.py View 1 2 3 4 1 chunk +226 lines, -0 lines 0 comments Download
A third_party/logilab/astng/exceptions.py View 1 2 3 4 1 chunk +60 lines, -0 lines 0 comments Download
A third_party/logilab/astng/inference.py View 1 2 3 4 1 chunk +382 lines, -0 lines 0 comments Download
A third_party/logilab/astng/inspector.py View 1 2 3 4 1 chunk +289 lines, -0 lines 0 comments Download
A third_party/logilab/astng/manager.py View 1 2 3 4 1 chunk +299 lines, -0 lines 0 comments Download
A third_party/logilab/astng/mixins.py View 1 2 3 4 1 chunk +136 lines, -0 lines 0 comments Download
A third_party/logilab/astng/node_classes.py View 1 2 3 4 1 chunk +903 lines, -0 lines 0 comments Download
A third_party/logilab/astng/nodes.py View 1 2 3 4 1 chunk +75 lines, -0 lines 0 comments Download
A third_party/logilab/astng/protocols.py View 1 2 3 4 1 chunk +321 lines, -0 lines 0 comments Download
A third_party/logilab/astng/raw_building.py View 1 2 3 4 1 chunk +345 lines, -0 lines 0 comments Download
A third_party/logilab/astng/rebuilder.py View 1 2 3 4 1 chunk +864 lines, -0 lines 0 comments Download
A third_party/logilab/astng/scoped_nodes.py View 1 2 3 4 1 chunk +977 lines, -0 lines 0 comments Download
A third_party/logilab/astng/utils.py View 1 2 3 4 1 chunk +241 lines, -0 lines 0 comments Download
A third_party/logilab/common/LICENSE.txt View 1 2 3 4 1 chunk +340 lines, -0 lines 0 comments Download
A third_party/logilab/common/README.chromium View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/logilab/common/__init__.py View 1 2 3 4 1 chunk +171 lines, -0 lines 0 comments Download
A third_party/logilab/common/__pkginfo__.py View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/logilab/common/cache.py View 1 2 3 4 1 chunk +114 lines, -0 lines 0 comments Download
A third_party/logilab/common/changelog.py View 1 2 3 4 1 chunk +236 lines, -0 lines 0 comments Download
A third_party/logilab/common/clcommands.py View 1 2 3 4 1 chunk +332 lines, -0 lines 0 comments Download
A third_party/logilab/common/cli.py View 1 2 3 4 1 chunk +208 lines, -0 lines 0 comments Download
A third_party/logilab/common/compat.py View 1 2 3 4 1 chunk +243 lines, -0 lines 0 comments Download
A third_party/logilab/common/configuration.py View 1 2 3 4 1 chunk +1069 lines, -0 lines 0 comments Download
A third_party/logilab/common/contexts.py View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/logilab/common/corbautils.py View 1 2 3 4 1 chunk +117 lines, -0 lines 0 comments Download
A third_party/logilab/common/daemon.py View 1 2 3 4 1 chunk +100 lines, -0 lines 0 comments Download
A third_party/logilab/common/date.py View 1 2 3 4 1 chunk +327 lines, -0 lines 0 comments Download
A third_party/logilab/common/dbf.py View 1 2 3 4 1 chunk +229 lines, -0 lines 0 comments Download
A third_party/logilab/common/debugger.py View 1 2 3 4 1 chunk +210 lines, -0 lines 0 comments Download
A third_party/logilab/common/decorators.py View 1 2 3 4 1 chunk +283 lines, -0 lines 0 comments Download
A third_party/logilab/common/deprecation.py View 1 2 3 4 1 chunk +112 lines, -0 lines 0 comments Download
A third_party/logilab/common/fileutils.py View 1 2 3 4 1 chunk +402 lines, -0 lines 0 comments Download
A third_party/logilab/common/graph.py View 1 2 3 4 1 chunk +273 lines, -0 lines 0 comments Download
A third_party/logilab/common/hg.py View 1 2 3 4 1 chunk +130 lines, -0 lines 0 comments Download
A third_party/logilab/common/interface.py View 1 2 3 4 1 chunk +71 lines, -0 lines 0 comments Download
A third_party/logilab/common/logging_ext.py View 1 2 3 4 1 chunk +178 lines, -0 lines 0 comments Download
A third_party/logilab/common/modutils.py View 1 2 3 4 1 chunk +653 lines, -0 lines 0 comments Download
A third_party/logilab/common/optik_ext.py View 1 2 3 4 1 chunk +397 lines, -0 lines 0 comments Download
A third_party/logilab/common/optparser.py View 1 2 3 4 1 chunk +90 lines, -0 lines 0 comments Download
A third_party/logilab/common/pdf_ext.py View 1 2 3 4 1 chunk +111 lines, -0 lines 0 comments Download
A third_party/logilab/common/proc.py View 1 2 3 4 1 chunk +277 lines, -0 lines 0 comments Download
A third_party/logilab/common/pyro_ext.py View 1 2 3 4 1 chunk +180 lines, -0 lines 0 comments Download
A third_party/logilab/common/pytest.py View 1 2 3 4 1 chunk +1177 lines, -0 lines 0 comments Download
A third_party/logilab/common/shellutils.py View 1 2 3 4 1 chunk +443 lines, -0 lines 0 comments Download
A third_party/logilab/common/sphinx_ext.py View 1 2 3 4 1 chunk +87 lines, -0 lines 0 comments Download
A third_party/logilab/common/sphinxutils.py View 1 2 3 4 1 chunk +122 lines, -0 lines 0 comments Download
A third_party/logilab/common/table.py View 1 2 3 4 1 chunk +923 lines, -0 lines 0 comments Download
A third_party/logilab/common/tasksqueue.py View 1 2 3 4 1 chunk +98 lines, -0 lines 0 comments Download
A third_party/logilab/common/testlib.py View 1 2 3 4 1 chunk +1382 lines, -0 lines 0 comments Download
A third_party/logilab/common/textutils.py View 1 2 3 4 1 chunk +532 lines, -0 lines 0 comments Download
A third_party/logilab/common/tree.py View 1 2 3 4 1 chunk +369 lines, -0 lines 0 comments Download
A third_party/logilab/common/umessage.py View 1 2 3 4 1 chunk +167 lines, -0 lines 0 comments Download
A third_party/logilab/common/ureports/__init__.py View 1 2 3 4 1 chunk +174 lines, -0 lines 0 comments Download
A third_party/logilab/common/ureports/docbook_writer.py View 1 2 3 4 1 chunk +139 lines, -0 lines 0 comments Download
A third_party/logilab/common/ureports/html_writer.py View 1 2 3 4 1 chunk +131 lines, -0 lines 0 comments Download
A third_party/logilab/common/ureports/nodes.py View 1 2 3 4 1 chunk +201 lines, -0 lines 0 comments Download
A third_party/logilab/common/ureports/text_writer.py View 1 2 3 4 1 chunk +140 lines, -0 lines 0 comments Download
A third_party/logilab/common/urllib2ext.py View 1 2 3 4 1 chunk +87 lines, -0 lines 0 comments Download
A third_party/logilab/common/vcgutils.py View 1 2 3 4 1 chunk +216 lines, -0 lines 0 comments Download
A third_party/logilab/common/visitor.py View 1 2 3 4 1 chunk +107 lines, -0 lines 0 comments Download
A third_party/logilab/common/xmlrpcutils.py View 1 2 3 4 1 chunk +131 lines, -0 lines 0 comments Download
A third_party/logilab/common/xmlutils.py View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
A third_party/pylint.py View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
A third_party/pylint/LICENSE.txt View 1 2 3 4 1 chunk +340 lines, -0 lines 0 comments Download
A third_party/pylint/README.chromium View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/pylint/__init__.py View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/pylint/__pkginfo__.py View 1 2 3 4 1 chunk +68 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/__init__.py View 1 2 3 4 1 chunk +163 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/base.py View 1 2 3 4 1 chunk +780 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/classes.py View 1 2 3 4 1 chunk +553 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/design_analysis.py View 1 2 3 4 1 chunk +344 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/exceptions.py View 1 2 3 4 1 chunk +197 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/format.py View 1 2 3 4 1 chunk +361 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/imports.py View 1 2 3 4 1 chunk +378 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/logging.py View 1 2 3 4 1 chunk +165 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/misc.py View 1 2 3 4 1 chunk +77 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/newstyle.py View 1 2 3 4 1 chunk +108 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/raw_metrics.py View 1 2 3 4 1 chunk +125 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/similar.py View 1 2 3 4 1 chunk +334 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/string_format.py View 1 2 3 4 1 chunk +157 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/typecheck.py View 1 2 3 4 1 chunk +376 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/utils.py View 1 2 3 4 1 chunk +316 lines, -0 lines 0 comments Download
A third_party/pylint/checkers/variables.py View 1 2 3 4 1 chunk +549 lines, -0 lines 0 comments Download
A third_party/pylint/config.py View 1 2 3 4 1 chunk +153 lines, -0 lines 0 comments Download
A third_party/pylint/epylint.py View 1 2 3 4 1 chunk +149 lines, -0 lines 0 comments Download
A third_party/pylint/gui.py View 1 2 3 4 1 chunk +452 lines, -0 lines 0 comments Download
A third_party/pylint/interfaces.py View 1 2 3 4 1 chunk +98 lines, -0 lines 0 comments Download
A third_party/pylint/lint.py View 1 2 3 4 1 chunk +934 lines, -0 lines 0 comments Download
A third_party/pylint/pyreverse/__init__.py View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/pylint/pyreverse/diadefslib.py View 1 2 3 4 1 chunk +231 lines, -0 lines 0 comments Download
A third_party/pylint/pyreverse/diagrams.py View 1 2 3 4 1 chunk +247 lines, -0 lines 0 comments Download
A third_party/pylint/pyreverse/main.py View 1 2 3 4 1 chunk +129 lines, -0 lines 0 comments Download
A third_party/pylint/pyreverse/utils.py View 1 2 3 4 1 chunk +131 lines, -0 lines 0 comments Download
A third_party/pylint/pyreverse/writer.py View 1 2 3 4 1 chunk +196 lines, -0 lines 0 comments Download
A third_party/pylint/reporters/__init__.py View 1 2 3 4 1 chunk +79 lines, -0 lines 0 comments Download
A third_party/pylint/reporters/guireporter.py View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
A third_party/pylint/reporters/html.py View 1 2 3 4 1 chunk +69 lines, -0 lines 0 comments Download
A third_party/pylint/reporters/text.py View 1 2 3 4 1 chunk +155 lines, -0 lines 0 comments Download
A third_party/pylint/utils.py View 1 2 3 4 1 chunk +531 lines, -0 lines 0 comments Download
D third_party/setuptools/LICENSE.txt View 1 2 3 4 1 chunk +0 lines, -210 lines 0 comments Download
D third_party/setuptools/README.chromium View 1 2 3 4 1 chunk +0 lines, -10 lines 0 comments Download
D third_party/setuptools/setuptools-0.6c11-py2.6.egg View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
chrisha
PTAL.
8 years, 7 months ago (2012-05-24 14:13:28 UTC) #1
chrisha
PTAL.
8 years, 6 months ago (2012-06-08 16:58:42 UTC) #2
M-A Ruel
lgtm with nti https://chromiumcodereview.appspot.com/10447014/diff/15019/bootstrap/win/pylint.new.bat File bootstrap/win/pylint.new.bat (right): https://chromiumcodereview.appspot.com/10447014/diff/15019/bootstrap/win/pylint.new.bat#newcode4 bootstrap/win/pylint.new.bat:4: "%~dp0python_bin\python.exe" "%~dp0pylint.py" %* I'd prefer: call ...
8 years, 6 months ago (2012-06-08 18:02:36 UTC) #3
M-A Ruel
Ping.
8 years, 6 months ago (2012-06-18 12:55:07 UTC) #4
chrisha
Oops! I'll get on it this morning! On Mon, Jun 18, 2012 at 8:55 AM, ...
8 years, 6 months ago (2012-06-18 13:09:28 UTC) #5
chrisha
Having a hard time uploading this (with fixed unittest) due to flaky internet in the ...
8 years, 6 months ago (2012-06-18 21:06:58 UTC) #6
M-A Ruel
On 2012/06/18 21:06:58, chrisha wrote: > (I had simply copied python.bat as a template, maybe ...
8 years, 6 months ago (2012-06-19 01:23:28 UTC) #7
chrisha
Thanks, committing.
8 years, 6 months ago (2012-06-19 14:52:06 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrisha@chromium.org/10447014/41017
8 years, 6 months ago (2012-06-19 14:52:15 UTC) #9
commit-bot: I haz the power
Presubmit check for 10447014-41017 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 6 months ago (2012-06-19 14:55:09 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrisha@chromium.org/10447014/41017
8 years, 6 months ago (2012-06-19 14:57:24 UTC) #11
commit-bot: I haz the power
Presubmit check for 10447014-41017 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 6 months ago (2012-06-19 15:00:28 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrisha@chromium.org/10447014/41017
8 years, 6 months ago (2012-06-19 15:04:03 UTC) #13
commit-bot: I haz the power
Presubmit check for 10447014-41017 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 6 months ago (2012-06-19 15:07:09 UTC) #14
M-A Ruel
On 2012/06/19 15:07:09, I haz the power (commit-bot) wrote: > Presubmit check for 10447014-41017 failed ...
8 years, 6 months ago (2012-06-19 15:08:05 UTC) #15
chrisha
Manually committing for now.
8 years, 6 months ago (2012-06-19 19:22:35 UTC) #16
Peter Mayo
On 2012/06/19 19:22:35, chrisha wrote: > Manually committing for now. This seems to be behind ...
8 years, 6 months ago (2012-06-19 22:11:59 UTC) #17
M-A Ruel
On 2012/06/19 22:11:59, Peter Mayo wrote: > On 2012/06/19 19:22:35, chrisha wrote: > > Manually ...
8 years, 6 months ago (2012-06-19 23:08:00 UTC) #18
scottmg
I'm getting "The command line is too long." errors when trying to dcommit in gyp ...
8 years, 6 months ago (2012-06-21 20:58:37 UTC) #19
chrisha
Urk... that's ugly. Due to licensing issues it was suggested that we break out to ...
8 years, 6 months ago (2012-06-21 21:02:07 UTC) #20
scottmg
On 2012/06/21 20:58:37, scottmg wrote: > I'm getting "The command line is too long." errors ...
8 years, 6 months ago (2012-06-21 21:04:01 UTC) #21
scottmg
On 2012/06/21 21:02:07, chrisha wrote: > Urk... that's ugly. Due to licensing issues it was ...
8 years, 6 months ago (2012-06-21 21:25:48 UTC) #22
chrisha
8 years, 6 months ago (2012-06-22 17:27:19 UTC) #23
Should be fixed as of
http://src.chromium.org/viewvc/chrome?view=rev&revision=143620

Let me know if you have any more troubles.

Chris

On Thu, Jun 21, 2012 at 5:25 PM,  <scottmg@chromium.org> wrote:
> On 2012/06/21 21:02:07, chrisha wrote:
>>
>> Urk... that's ugly. Due to licensing issues it was suggested that we
>> break out to pylint via the command-line rather than to load it
>> directly as a module. I definitely didn't think about the 'command
>> line too long' aspect as I did most my testing with small codebases.
>
>
>> I'll take a look tomorrow morning (just on my way out the door), but
>> we should be able to get around this by writing a new pylint wrapper
>> that can read the file list from stdin, and pipe the list to the child
>> process.
>
>
>> Other ideas?
>
>
> That sounds fine to me. I tried to find docs for the rc file but didn't come
> up
> with much. Putting the list of files/modules/whatever in there might be
> easier
> if it's possible.
>
> https://chromiumcodereview.appspot.com/10447014/

Powered by Google App Engine
This is Rietveld 408576698