[code-quality] Pylint configuration in setup.cfg

Peter Bittner peter.bittner at gmx.net
Tue Oct 21 16:00:18 CEST 2014


Hi there the makers of Pylint,

has anyone ever thought about suggesting in the Pylint docs to place
configuration options in a Python project's `setup.cfg` file?

The interesting thing is that when you do a web search for "flake8 pylint
comparison" the opinions you find are somewhat, "flake8 and pylint are
complimentary tools [...] pylint is harder to configure".

So, yes, a bit more complex to configure. But after all the active
configuration can be generated, and it looks like all options can easily be
put into one of the standard places, such as `setup.cfg`. I've put all my
flake8 configuration (3 lines, really) and some additional pylint-specific
options into the setup.cfg file in my project [1], and ran pylint with it
as follows:

$ pylint --rcfile=setup.cfg organice

[1] https://github.com/bittner/django-organice/blob/develop/setup.cfg

If now, by magic, pylint would look for a setup.cfg file automatically
(maybe in the second place, after not finding the default resource file)
the command line would be reduced to "pylint <module>". Wouldn't that be
awesome?

What do you think? Would you accept an appropriate pull request on the docs
in the first place?

BTW, I found issue #121 on Bitbucket with the latest comment saying just
about the same in just one sentence:
https://bitbucket.org/logilab/pylint/issue/121/search-pylintrc-in-config-directory

Regards,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/code-quality/attachments/20141021/bba6dd0f/attachment.html>


More information about the code-quality mailing list