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
commit25f7172c2bbe2a22ffa104c6bcf9ea0fd751e6ba (patch)
tree7ae251639aa5eb289fac8bb4d4878cc680d09d4b /utils.py
parent00e028211f20cfc3c171f7848fbf88443e0e614c (diff)
downloadpylint-git-25f7172c2bbe2a22ffa104c6bcf9ea0fd751e6ba.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 591aeb70a..a6e57a542 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