You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, PHP_CodeSniffer will exit with a non-zero code if any errors or warnings are found. If you want to display errors to the user, but still return with a zero exit code if no warnings are found, you can set the `ignore_errors_on_exit` configuration option. This option is typically used by automated build tools so that a list of errors can be generated without failing the build.
195
+
By default, PHP_CodeSniffer will exit with a non-zero code if any errors or warnings are found.
196
+
197
+
If you want to display errors to the user, but still return with a zero exit code if no warnings are found, you can set the `ignore_errors_on_exit` configuration option.
198
+
_This option is typically used by automated build tools so that a list of errors can be generated without failing the build._
## Ignoring warnings when generating the exit code
212
215
213
-
By default, PHP_CodeSniffer will exit with a non-zero code if any errors or warnings are found. If you want to display warnings to the user, but still return with a zero exit code if no errors are found, you can set the `ignore_warnings_on_exit` configuration option. This option is typically used by automated build tools so that a list of warnings can be generated without failing the build.
216
+
By default, PHP_CodeSniffer will exit with a non-zero code if any errors or warnings are found.
217
+
218
+
If you want to display warnings to the user, but still return with a zero exit code if no errors are found, you can set the `ignore_warnings_on_exit` configuration option.
219
+
_This option is typically used by automated build tools so that a list of warnings can be generated without failing the build._
## Ignoring non-auto-fixable issues when generating the exit code (PHP_CodeSniffer >= 4.0.0)
223
229
224
230
By default, PHP_CodeSniffer will exit with a non-zero code if any errors or warnings are found, whether these are auto-fixable or not.
225
-
If you want to display non-auto-fixable errors and warnings to the user, but still return with a zero exit code if non-auto-fixable issues are found, you can set the `ignore_non_auto_fixable_on_exit` configuration option.
226
-
This option is typically used by automated build tools so that a `phpcbf` run can exit with `0`if it fixed all fixable issues, but there are still some non-auto-fixable issues remaining.
231
+
232
+
If you want to display non-auto-fixable errors and warnings to the user, but still return with a zero exit code if non-auto-fixable issues are found, you can set the `ignore_non_auto_fixable_on_exit` configuration option.
233
+
_This option is typically used by automated build tools so that a `phpcbf` run can exit with `0`if it fixed all fixable issues, but there are still some non-auto-fixable issues remaining._
0 commit comments