[Python-projects] pylint : disable all checkers but one

Sylvain Thénault sylvain.thenault at logilab.fr
Tue Sep 11 10:13:55 CEST 2012


On 10 septembre 11:12, afayolle wrote:
> Hello list,

Hi Alexandre,

> I'm using
> 
> $ pylint --version
> pylint 0.25.0,
> astng 0.23.0, common 0.57.1
> Python 2.7.3 (default, Aug  1 2012, 05:16:07)
> [GCC 4.6.3]
> 
> 
> I'm looking for a way of running just the similarities checker on my code.
> 
> I've managed so far with:
> 
> pylint
> --disable="basic,logging,string_format,format,typecheck,variables,miscellaneous,metrics,imports,classes,design,exceptions,newstyle"
> 
> but this is quite awkward, and not resistant to future addition of new
> checkers.
> 
> Ideally, I'd like to be able to write --disable-all
> --enable=similarities, but this does not work (disable-all being only
> available as an in-file directive, as far as I can tell). Any other
> suggestion before I wet my hands in a patch to enable --disable-all on
> the command line?

Having disable-all working on the command line would be cool (there is a ticket
for that matter iirc). So I'm not sure I should tell you that you could try
"--disable=IEWRC --enable=similarities"...
-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (09.54.03.55.76)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the Python-Projects mailing list