On 30 August 2012 18:33, Pierre-Yves David <pierre-yves.da...@logilab.fr> wrote:
> On Thu, Aug 30, 2012 at 03:04:17PM +1000, Martin Pool wrote:
>
>> It seems to me that it would be nice if it was possible to use short
>> symbolic names instead, similar to gcc warnings, like Wunused-imports
>> or Wunreachable.
>
> That sounds like a great idea!

Great!  Here's a first cut of a patch for it.  I have not yet added
symbols for all warnings but I think it could stand to have some
review.

Example output:

% python lint.py -rn -sy lint.py
No config file found, using default configuration
************* Module pylint.lint
I: 63,0: Unable to consider inline option "(.*)')"
I:433,0: Locally disabling E1102
I:435,0: Locally disabling E1101
C(line-too-long):228,0: Line too long (86/80)
C(line-too-long):237,0: Line too long (81/80)
C(line-too-long):317,0: Line too long (83/80)
C(line-too-long):442,0: Line too long (87/80)
C(line-too-long):648,0: Line too long (81/80)
C(line-too-long):841,0: Line too long (82/80)
C(line-too-long):903,0: Line too long (91/80)
W(fixme):555,0: XXX hack, to be correct we need to keep module_msgs_state
W(fixme):615,0: XXX code below needs refactoring to be more reporter agnostic
W(fixme):716,0: XXX syt, actually needed since we don't import code?
W(fixme):953,0: FIXME
C(no-space-after-comma): 50,0: Comma not followed by a space
from pylint.utils import PyLintASTWalker, UnknownMessage, MessagesHandlerMixIn,\
                                                                              ^^
C(missing-docstring): 71,0:_get_python_path: Missing docstring
R:132,0:PyLinter: Too many ancestors (8/7)
R:132,0:PyLinter: Too many instance attributes (16/7)
C(missing-docstring):156,4:PyLinter.make_options: Missing docstring
C(missing-docstring):293,4:PyLinter.load_default_plugins: Missing docstring
C(missing-docstring):355,4:PyLinter.disable_noerror_messages: Missing docstring
W:642,15:PyLinter.report_evaluation: Catching too general exception Exception
W:560,12:PyLinter.set_current_module: Attribute
'_module_msg_cats_state' defined outside __init__
R:132,0:PyLinter: Too many public methods (70/20)
C:742,16:preprocess_options: Invalid name "cb" (should match
[a-z_][a-z0-9_]{2,30}$)
W:766,44:Run.__init__: Redefining built-in 'exit'
C:775,43:Run.__init__: Invalid name "e" (should match [a-z_][a-z0-9_]{2,30}$)
W:960,4:cb_init_hook: Use of the exec statement
W: 31,0: Unused import utils
-- 
Martin
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to