PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

Revise exit codes for PHPCS and PHPCBF commands

Open gsherwood opened this issue 4 years ago • 4 comments

Version 4 is a good time to review the exit codes that both scripts produce to ensure that success cases all use 0 and that all failure cases have codes that make sense. Documentation in the wiki to describe the new exist codes should be an output of this work.

gsherwood avatar Mar 10 '20 21:03 gsherwood

Loosely related open issues:

  • #1818
  • #2412 (discoverability of availability of exit code related CLI arguments)

jrfnl avatar May 07 '20 23:05 jrfnl

Param --runtime-set ignore_warnings_on_exit 1 works on phpcs, but it does not for phpcbf.

nelson6e65 avatar Nov 30 '20 07:11 nelson6e65

Is there any documentation somewhere that lists all non 0 or 1 exit codes that exist, and the meaning of them?

Today was the first time I discovered an exit code of 3 is used for when and invalid standard is given. It'd be nice to be able to read a compiled list of what exit codes there are, and I cannot seem to find any information on the wiki on this topic.

dfelton avatar Mar 14 '22 15:03 dfelton

@dfelton I think this is what you are looking for: https://github.com/squizlabs/PHP_CodeSniffer/issues/930#issuecomment-229562566

jrfnl avatar Mar 14 '22 23:03 jrfnl