from
Sylvain Thénault <thenault at nerim dot net>
to
wrobell <wrobell at ite dot pl>
subject
[Python-projects] Re: pylint 0.2
date
On Friday 03 October à 14:47, wrobell wrote:2003/10/03 18:41
hello
> pylint 0.2, logilab common module 0.3.3, python 2.3.1 and optparse
> bundled with python 2.3.1
>
> test module:
> - xx.py -----------
> from re import *
> very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long = 1
> print very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long
> -------------------
>
> 1. Standard, distributed pylintrc in logilab-pylint-0.2.0/examples
> directory gives following exception:
>
> $ pylint xx.py
> Traceback (most recent call last):
> File "/usr/bin/pylint", line 4, in ?
> lint.Run(*sys.argv[1:])
> File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 486, in __init__
> File "/usr/lib/python2.3/site-packages/logilab/common/configuration.py", line 179, in load_file_configuration
> File "/usr/lib/python2.3/ConfigParser.py", line 263, in read
> File "/usr/lib/python2.3/ConfigParser.py", line 456, in _read
> ConfigParser.MissingSectionHeaderError: File contains no section headers.
> file: /home/users/wrobell/.pylintrc, line: 1
> 'SITE CUSTOMIZED\n'
>
> Attached pylint-rc patch solves the problem. The patch also changes
> the evaluation entry due to
>
> An exception occured while rating: float argument required
>
> message - the expression is not quoted now.
no file attached, but I've checked the configuration file and some
errors have definitly be introduced into it when I've generated it...
Fixed in the cvs.
> 2. Run pylint with fixed pylintrc and no metrics are used at all:
>
> $ pylint xx.py
> 1
>
> Report for xx
> =============
>
> 4 statements analysed in /home/users/wrobell.
>
> Errors / warnings by module
> ---------------------------
>
> MODULE ERROR WARNING
> xx 0.00 0.00
>
>
> Total errors / warnings
> -----------------------
>
> TYPE NUMBER PREVIOUS DIFFERENCE
> warnings 0 0 =
> errors 0 0 =
>
>
> Global evaluation
> -----------------
>
> Your code has been rated at 10.00 / 10.
>
> Please note, that format checker is enabled in pylintrc and max length of line
> is 80 characters.
Hum, I don't have the config file so I'm not sure to understand the
problem here. I've tested with a configuration file where all checkers
but format was disabled, and with "pylint --disable-all --enable-format xx"
and both printed the expected "Too long line".
regards
--
Sylvain Thénault
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects
