[wingide-users] PyLint Integration Script (Beta 1)

Markus Meyer meyer at mesw.de
Fri Jun 30 09:41:37 EDT 2006


Hi everyone,

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
2.1.

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"
message.

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.

Have fun!
Markus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pylintpanel.py
Type: text/x-python
Size: 13723 bytes
Desc: not available
Url : /pipermail/wingide-users/attachments/20060630/3298594b/pylintpanel.py


More information about the wingide-users mailing list