toolcontext: `errors_info` reset couts
authorJean Privat <jean@pryen.org>
Fri, 28 Nov 2014 02:52:05 +0000 (21:52 -0500)
committerJean Privat <jean@pryen.org>
Fri, 28 Nov 2014 02:52:05 +0000 (21:52 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/toolcontext.nit

index ec91130..dd5014f 100644 (file)
@@ -129,12 +129,14 @@ class ToolContext
                end
        end
 
-       # Display total error informations
+       # Display (and reset) total error informations
        fun errors_info
        do
                if error_count == 0 and warning_count == 0 then return
                if opt_no_color.value then return
                sys.stderr.write "Errors: {error_count}. Warnings: {warning_count}.\n"
+               error_count = 0
+               warning_count = 0
        end
 
        # Display an error