Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)
a...@pythoncraft.com (Aahz) writes: Second, you can configure pylint to respect your personal style How? I haven't seen any decent documentation on doing so. -- \ “When we call others dogmatic, what we really object to is | `\ their holding dogmas that are different from our own.” —Charles | _o__) Issawi | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list
Re: Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)
On Thu, Apr 23, 2009 at 2:58 PM, Ben Finney ben+pyt...@benfinney.id.auben%2bpyt...@benfinney.id.au wrote: a...@pythoncraft.com (Aahz) writes: Second, you can configure pylint to respect your personal style How? I haven't seen any decent documentation on doing so. -- \ “When we call others dogmatic, what we really object to is | `\ their holding dogmas that are different from our own.” —Charles | _o__) Issawi | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list I'm fairly certain that ~/.pylint.rc is just the command line options available to pylint made into a conf file. See http://flexget.com/browser/trunk/pylint.rc?rev=475 for an example. So, for a section from pylint --help like so: Miscellaneous: --notes=comma separated values List of note tags to take in consideration, separated by a comma. [current: FIXME,XXX,TODO] You would make a configuration item like so: [MISCELLANEOUS] notes=FIXME,TODO This is a fairly common thing for command-line app configurations. -- http://mail.python.org/mailman/listinfo/python-list
Re: Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)
In article 874owf4gky.fsf...@benfinney.id.au, Ben Finney ben+pyt...@benfinney.id.au wrote: a...@pythoncraft.com (Aahz) writes: Second, you can configure pylint to respect your personal style How? I haven't seen any decent documentation on doing so. Actually, I don't know how, I'm just repeating what was claimed at a presentation on pylint. ;-) I've traditionally used pychecker myself and haven't seen any reason to switch. -- Aahz (a...@pythoncraft.com) * http://www.pythoncraft.com/ If you think it's expensive to hire a professional to do the job, wait until you hire an amateur. --Red Adair -- http://mail.python.org/mailman/listinfo/python-list
Re: Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)
On Thu, Apr 23, 2009 at 12:00 PM, Aahz a...@pythoncraft.com wrote: In article 874owf4gky.fsf...@benfinney.id.au, Ben Finney ben+pyt...@benfinney.id.au wrote: a...@pythoncraft.com (Aahz) writes: Second, you can configure pylint to respect your personal style How? I haven't seen any decent documentation on doing so. Actually, I don't know how, I'm just repeating what was claimed at a presentation on pylint. ;-) I've traditionally used pychecker myself and haven't seen any reason to switch. I believe you just: pylint --generate-rcfile ~/.pylintrc and then customize that file. -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek -- http://mail.python.org/mailman/listinfo/python-list
Re: Configuring pylint for local conventions
David Stanek dsta...@dstanek.com writes: I believe you just: pylint --generate-rcfile ~/.pylintrc That's the easy part, yes. and then customize that file. This is the part that I'm asking how to do. What documentation is there on this configuration file and recommendations on how to modify it? -- \“Pinky, are you pondering what I'm pondering?” “Wuh, I think | `\ so, Brain, but wouldn't anything lose its flavor on the bedpost | _o__) overnight?” —_Pinky and The Brain_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list
Re: Configuring pylint for local conventions
Ben Finney ben+pyt...@benfinney.id.au writes: David Stanek dsta...@dstanek.com writes: I believe you just: pylint --generate-rcfile ~/.pylintrc and then customize that file. This is the part that I'm asking how to do. What documentation is there on this configuration file and recommendations on how to modify it? For bonus points, I'm actually wanting to know how to configure it per *project*, and applying that configuration for all programmers of that project. Having one set of coding conventions per *user* seem like a recipe for frustration. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but culottes have a tendency to ride up so.” —_Pinky and | _o__) The Brain_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list
Re: Configuring pylint for local conventions
On Thu, Apr 23, 2009 at 10:21 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Ben Finney ben+pyt...@benfinney.id.au writes: David Stanek dsta...@dstanek.com writes: I believe you just: pylint --generate-rcfile ~/.pylintrc and then customize that file. This is the part that I'm asking how to do. What documentation is there on this configuration file and recommendations on how to modify it? For bonus points, I'm actually wanting to know how to configure it per *project*, and applying that configuration for all programmers of that project. Having one set of coding conventions per *user* seem like a recipe for frustration. I find that the comments in the file it generates are enough. I haven't needed any more documentation than that. For project specific configuration I just keep a config file[1] in the project's source repository. Then make my build script[2] specify that file when I run 'paver lint'. [1] http://bitbucket.org/dstanek/snake-guice/src/tip/pylint.cfg [2] http://bitbucket.org/dstanek/snake-guice/src/tip/pavement.py -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek -- http://mail.python.org/mailman/listinfo/python-list
Re: Configuring pylint for local conventions
David Stanek dsta...@dstanek.com writes: I find that the comments in the file it generates are enough. I haven't needed any more documentation than that. I'll take that as a data point in support of “there is no documentation for pylint except the configuration file itself”. Thanks. -- \ “Dvorak users of the world flgkd!” —Kirsten Chevalier, | `\rec.humor.oracle.d | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list