Bug #19777 [Csd]: Warnings should not produce an exit code that is non-zero

From: Date: Sun, 06 Jan 2013 21:25:31 +0000
Subject: Bug #19777 [Csd]: Warnings should not produce an exit code that is non-zero
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9458@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19777&edit=1 ID: 19777 Updated by: duesterhus@woltlab.com Reported By: duesterhus at woltlab dot com Summary: Warnings should not produce an exit code that is non-zero Status: Closed Type: Bug Package: PHP_CodeSniffer Operating System: Linux node42 3.5.0-21-generic #3 Package Version: SVN PHP Version: Irrelevant Assigned To: squiz Roadmap Versions: New Comment: > If you don't care about warnings, using the -n command line argument. This will surpress warnings and you'll get a 0 exit code. Well, I am interested in warnings, but only in a way that tests do not fail. By using -n there is no way to find out whether there are warnings. The current situation makes nonsense of warnings as they are not different to errors. Previous Comments: ------------------------------------------------------------------------ [2013-01-06 21:04:22] squiz -Status: Open +Status: Closed -Assigned To: +Assigned To: squiz The exit code indicates how many messages were found, and it always has, so I'm not changing that. If you don't care about warnings, using the -n command line argument. This will surpress warnings and you'll get a 0 exit code. ------------------------------------------------------------------------ [2013-01-05 13:17:15] timwolla Description: ------------ When there are not errors but only warnings I expect the exit-code to be different from an exit-code when there *are* errors. Test script: --------------- #!/bin/bash phpcs --extensions=php . # Only Warnings show up echo $? Expected result: ---------------- FILE: bug.php -------------------------------------------------------------------------------- FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 9 | WARNING | irrelevant -------------------------------------------------------------------------------- 0 # clean exit Actual result: -------------- FILE: bug.php -------------------------------------------------------------------------------- FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 9 | WARNING | irrelevant -------------------------------------------------------------------------------- 1 # error! ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19777&edit=1

« previous php.pear.bugs (#9458) next »