Hey,

* Philip Jay <p...@jay.id.au> [2016-01-20 23:25:42 +1100]:
> Instead of accepting a threshold like 8/10 or whatever...
> Set your continuous integration pipeline to fail a build if you don't get
> 10/10.    (yes! you read it correctly!)

It's already pylint's default behaviour to exit nonzero if there are
any messages. I personally never look at the report/score, and instead
configure pylint to not output any messages.

> Then, where you need to deviate from 'perfect style' - use an inline
> disable.
> 
> eg. # pylint: disable=invalid-name
> 
> Two advantages:
> - deviations from style end up clearly flagged in code-review / pull
> requests
> - it's not the fault of the one person who tips the score from 8.01 to 7.98
> to fix a bunch of style errors
> 
> 
> Maybe this is common knowledge, maybe it's not.
> It was new for me - and I think it's really good practice, so I'm sharing
> it : )

Or you can also configure things globally in a .pylintrc, for rules
you disagree with completely, or to fine-tune certain checkers.

As an example, here is mine:
https://github.com/The-Compiler/qutebrowser/blob/master/.pylintrc

Florian

-- 
http://www.the-compiler.org | m...@the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
https://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to