[wingide-users] PyLint Integration Script (Beta 1)
rwarren at picarro.com
Fri Jun 30 12:12:21 EDT 2006
I love it! This is totally fantastic... I can now kiss all my flip-to-command-line-to-run-pychecker-then-flip-back-and-ctrl-L-my-way-to-the-offending-line pain goodbye!
Very very nice! Excellent integration!
Now to learn how to configure pyLint to not give me a bazillion warnings and "info".
From: wingide-users-bounces at wingware.com
[mailto:wingide-users-bounces at wingware.com]On Behalf Of Markus Meyer
Sent: Friday, June 30, 2006 9:42 AM
To: wingide-users at wingware.com
Subject: [wingide-users] PyLint Integration Script (Beta 1)
find attached a first beta version of my PyLint Integration script. It
can be used to check the current active script in Wing IDE with PyLint.
It has been tested with both Linux and Windows, but only works with Wing
PyLint messages will be shown in three different categories:
Errors: Those are PyLint fatal errors (code "F") and problems where
PyLint finds that a command will likely create a runtime error (code
"E"). Those should be considered serious, that is, a normal Python code
should not create any output in the "Errors" section.
Warnings: Those are warnings from PyLint (code "W"), e.g., that a
variable is unused. Depending on the context, they may be serious or not.
Info: In this category, all other messages from PyLint are shown, e.g.
if you switched on metrics checking and PyLint finds that a line is too
long, or you have too many member functions in a class.
To use, copy the script "pylintpanel.py" into your scripts/ directory
and restart Wing. Then insert the tool "PyLint" into a toolbox. Click
anywhere into the empty list with the right mouse button and a context
menu will appear. Choose "Preferences..." to open a config file where
you can set PyLint preferences and save and close the file. Open a
Python file, then choose "Update" from the PyLint panel context menu.
After some processing time, the results from PyLint will be displayed,
grouped by the different categories. Click on a message to scroll to the
line where PyLint thinks the error is.
Note that of course you need to have PyLint installed within your Python
distribution. On Windows, this means that you should have a file
"C:\Python24\Scripts\PyLint.bat" on your hard disk. Before using this
script, please try to use PyLint on the command line to make sure that
everything's ok with your PyLint installation.
The module defines two global messages: "execute-pylint" and
"pylint-preferences". You can use Wing's keyboard preferences to assign
a hotkey to them, which is especially useful for the "execute-pylint"
The module is BSD-licensed, so feel free to do whatever you like with
it. This includes adding it to the Wing distribution.
Feedback, ideas and patches are greatly appreciated.
More information about the wingide-users