Bug 90232

Summary: add a pylint wrapper for linting python code
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: New BugsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, levin, ojan, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch abarth: review+

Description Dirk Pranke 2012-06-28 18:00:15 PDT
add a pylint wrapper for linting python code
Comment 1 Dirk Pranke 2012-06-28 18:05:06 PDT
Created attachment 150053 [details]
Patch
Comment 2 Dirk Pranke 2012-06-28 18:06:19 PDT
the pylintrc file is cloned from the one chromium uses in depot_tools, tweaked to follow webkit's coding standards roughly. I will probably want to tweak it some more once I've run it over more of the codebase.
Comment 3 Adam Barth 2012-06-28 18:10:50 PDT
Comment on attachment 150053 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=150053&action=review

We'll want to integrate this into check-webkit-style at some point so that it gets run automagically.

> Tools/Scripts/webkitpy/pylintrc:43
> +ignore=CVS

Do we need to say something about SVN here?

> Tools/Scripts/webkitpy/pylintrc:130
> +init-import=no

We'd like to do this at some point.  Importing into __init__ turns out to be sketchier than we realized.
Comment 4 Dirk Pranke 2012-06-28 18:13:09 PDT
(In reply to comment #3)
> (From update of attachment 150053 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=150053&action=review
> 
> We'll want to integrate this into check-webkit-style at some point so that it gets run automagically.
> 
> > Tools/Scripts/webkitpy/pylintrc:43
> > +ignore=CVS
> 
> Do we need to say something about SVN here?
> 

Possibly; I haven't tried this under svn yet.

> > Tools/Scripts/webkitpy/pylintrc:130
> > +init-import=no
> 
> We'd like to do this at some point.  Importing into __init__ turns out to be sketchier than we realized.

Yeah, there's probably a few things we should turn on.

Also, I need to fix the license text in lint-webkitpy. Somehow the version I added the text to didn't get included in the patch.
Comment 5 Dirk Pranke 2012-06-28 18:46:19 PDT
Committed r121502: <http://trac.webkit.org/changeset/121502>