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

Dan Cook onedsc at sonic.net
Fri Jun 30 12:46:29 EDT 2006


Markus, 

Thanks for the script.
For some reason, the highlighted line appears to be off by one from what is
reported in the panel.
For example if I have an error on line 73, when I click on it in the panel
it highlights line 74.

- Dan 
 

-----Original Message-----
From: wingide-users-bounces at wingware.com
[mailto:wingide-users-bounces at wingware.com] On Behalf Of Markus Meyer
Sent: Friday, June 30, 2006 6:42 AM
To: wingide-users at wingware.com
Subject: [wingide-users] PyLint Integration Script (Beta 1)

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




More information about the wingide-users mailing list