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

From: Date: Sun, 06 Jan 2013 21:04:22 +0000
Subject: Bug #19777 [Opn->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-9456@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: gsherwood@squiz.net Reported By: duesterhus at woltlab dot com Summary: Warnings should not produce an exit code that is non-zero -Status: Open +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: +Assigned To: squiz Roadmap Versions: New Comment: -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. Previous Comments: ------------------------------------------------------------------------ [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 (#9456) next »