Custom exit value of check-items
Hi, I’m using pylint in buildbot, and I want to customize failure items. Now I think buildbot give failure result since pylint returns(exit) contains 1 or 2. So, I wonder how can I customize an error/warning to trigger failure. e.g, when pylint found an C0101, it exit 1 or 2. Thanks Froilan
* 岳星兆
I’m using pylint in buildbot, and I want to customize failure items.
Note buildbot comes with a PyLint buildstep which parses the results: http://docs.buildbot.net/current/manual/cfg-buildsteps.html#step-PyLint
Now I think buildbot give failure result since pylint returns(exit) contains 1 or 2.
I think it exists with 0 when no errors are found, and != 0 if there are errors. That worked fine in buildbot for me (until I discovered the thing above). Florian -- http://www.the-compiler.org | me@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/
Apologies, i'm not 100% sure I understood what you need. You can always disable any checks you don't care for: --disable=C0101,C0102 Do you still want to see the warnings about stuff like C0101, just don't want the build to be marked as failed? In the latest versions of pylint the exit code is a bitwise or of the following: MSG_TYPES_STATUS = { 'I' : 0, # info 'C' : 16, # conventions 'R' : 8, # refactor 'W' : 4, # warning 'E' : 2, # error 'F' : 1 # fatal } You could always write some custom logic in your buildbot config, or wrap your pylint invocation in a bash script that looks at the return value and marks the build appropriately. Regards, R. On Fri, May 22, 2015, at 01:13 PM, 岳星兆 wrote:
Hi,
I’m using pylint in buildbot, and I want to customize failure items.
Now I think buildbot give failure result since pylint returns(exit) contains 1 or 2.
So, I wonder how can I customize an error/warning to trigger failure. e.g, when pylint found an C0101, it exit 1 or 2.
Thanks Froilan _________________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
participants (3)
-
Florian Bruhin
-
Radu Ciorba
-
岳星兆