pkl
pkl copied to clipboard
`pkl format` should not exit with 11 in case of violation found
I'm not an CLI nor an exit code expert.
But when I run pkl format -w . I realize that it exit with 11 (violation found).
This is also documented:
However, I think a CLI should only return non zero in case of an error in the process. It should not return non zero in case the CLI (format) tool runs successfully, but found problems.
Looking also into wikipedia about Exit status:
For the shell's purposes, a command which exits with a zero exit status has succeeded. A nonzero exit status indicates failure.
For me it sounds like "a non exit code means the program doesn't behave correctly, failed for some reaasons". But it is not! It just found violation errors. This is his job 🤷 😁
What do you think?