When I call diffFilter on an empty change set, it logs a "No lines found!" error but returns a 0 success code.
For example:
diffFilter --phpcsStrict < (git diff HEAD...HEAD) phpcs.json --report=phpcs 0
outputs an empty string, instead of a JSON object.
In my scripting, when a command returns success code, I assume it produced the output in expected format as it does for any successful input and run.
If the command encounters an error, making it unable to proceed to produce meaningful output, it should return error code, so I could catch that and act accordingly.
But, the line
|
error_log('No lines found!'); |
|
return; |
logs an error, does not produce any output, and returns "successfully".
IMHO, it should either
When I call
diffFilteron an empty change set, it logs a "No lines found!" error but returns a0success code.For example:
diffFilter --phpcsStrict < (git diff HEAD...HEAD) phpcs.json --report=phpcs 0outputs an empty string, instead of a JSON object.
In my scripting, when a command returns success code, I assume it produced the output in expected format as it does for any successful input and run.
If the command encounters an error, making it unable to proceed to produce meaningful output, it should return error code, so I could catch that and act accordingly.
But, the line
coverageChecker/src/functions.php
Lines 94 to 95 in 495c9cb
logs an error, does not produce any output, and returns "successfully".
IMHO, it should either