summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorMads Kiilerich <mads@kiilerich.com>2009-01-28 00:58:01 +0100
committerMads Kiilerich <mads@kiilerich.com>2009-01-28 00:58:01 +0100
commitacb3ee99b9c67e6985dad3a75309b3313c7c4614 (patch)
tree13ec0391a71f32557b98d1025c3b623681e76e0d /utils.py
parent1e7cf05f485d5ab18671679f83b9df91442dce40 (diff)
downloadpylint-acb3ee99b9c67e6985dad3a75309b3313c7c4614.tar.gz
Let pylint exit code indicate result of checks
If _any_ messages are shown the exitcode will be set to 2. (Exitcode 1 already indicates that no files were specified.) This implements what is requested on https://www.logilab.net/elo/ticket/4691 . The approach taken in this patch is however that any message is an error. If a message shouldn't count as an error it should be disabled. There is a risk that some tool tools which call pylint could interprete the exit code as if _pylint_ failed, and not that pylint completed its job and concluded that the checked _files_ failed. Some smoketests fails with this change - how do I change them to accept exitcode 2?
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 591aeb7..a6e57a5 100644
--- a/utils.py
+++ b/utils.py
@@ -234,6 +234,7 @@ class MessagesHandlerMixIn:
if not self.is_message_enabled(msg_id, line):
return
# update stats
+ self.msg_counter += 1
msg_cat = MSG_TYPES[msg_id[0]]
self.stats[msg_cat] += 1
self.stats['by_module'][self.current_name][msg_cat] += 1