[Python-projects] pylint --output-format option

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Feb 12 11:48:18 CET 2009


Le Tuesday 10 February 2009 21:52:58 Mads Kiilerich, vous avez écrit :
> Saegebrecht Martin wrote, On 02/10/2009 12:51 PM:
> > the options: --output-format and --files-output seems to conflict with
> > each other.
> >
> > If I write:
> >
> > /pylint --output-format=html foo.py/ I get the output in html on
> > standard output (and yes you can pipe it to a file if you whant to but
> > thats not the issue here)
> >
> > But if I write:
> >
> > /pylint --output-format=html --files-output=y foo.py/ I get
> > pylint_foo.html but this file is EMPTY?
> >
> > Why?
>
> The more interesting question is if it is intended behaviour. I don't
> think so.
>
> To answer your question: That's because the output is set to use the
> right output file, but for HTML the messages are buffered to ensure that
> they are written in one well-formed chunk, and the pending messages
> isn't flushed before the output is changed, so all messages ends up in
> pylint_global.html.

good catch. I've checked in your fix (slightly modified to make it works ;)
thank you both!
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Python et calcul scientifique:           http://www.logilab.fr/science


More information about the Python-Projects mailing list