[Python-projects] Pylint 1.12.1 no longer reads my .pylintrc file
Marien Zwart
marienz at gentoo.org
Thu Sep 28 19:26:38 CEST 2006
On Thu, Sep 28, 2006 at 04:49:55PM +0200, Maarten ter Huurne wrote:
> Marien Zwart wrote on 2006-09-27 01:52:06 AM:
>
> > I thought I hit the same thing, but it is just a somewhat obfuscated
> > change, I think. The settings for
> --{enable,disable}-{checker,msg-cat,msg}
> > moved from the "MASTER" section to the "MESSAGES CONTROL" section.
> > This is (somewhat) indicated in pylint --help. Unfortunately it looks
> > like pylint --generate-rcfile omits options with no value set and
> > entire sections if they have no options set, so it took me a while to
> > figure this out.
> >
> > Not sure how that could be improved, but a way to generate a complete
> > rcfile (even including unset and default settings) might be helpful
> > (or is that already there and did I just miss it?)
>
> It is possible to solve this, but it would require significant changes to
> PyLint:
> - if the rcfile format changes, PyLint will have to include parser for the
> old format and a parser for the new format
> - the rcfile would have to include a version number at the start, so
> PyLint knows which parser to use
> - with "--generate-rcfile" the user can convert an old format rcfile to a
> new format one
While that would be nifty, I think some simpler changes would help too:
- Have pylint warn (possibly only if a special option is passed, to help
sharing a pylintrc between pylint versions) if an option in the pylintrc
is not recognized (currently such options seem to be ignored).
- Have an option to generate a complete rcfile, including options that are
unset or set to their default value.
While I do not know how others do this, my approach for generating an
rcfile was doing "pylint --generate-rcfile > ~/.pylintrc" and then
editing it. If default/unset values are omitted that does not work
very well, and it was not obvious (not to me at least) that the
"Messages control" header in --help meant I had to use a "[MESSAGES
CONTROL]" section in .pylintrc. The above changes would make it all a
bit more obvious, I think.
If you agree this would help I could try to produce a patch.
--
Marien.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.logilab.org/pipermail/python-projects/attachments/20060928/5c0c7d44/attachment.pgp
More information about the Python-Projects
mailing list