-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
diffFilter
outputs in incorrect format if there are no changes
#72
Comments
tomalec
changed the title
Jul 8, 2022
diffFilter
outputs in incorrect format if there are not changesdiffFilter
outputs in incorrect format if there are no changes
tomalec
added a commit
to tomalec/coverageChecker
that referenced
this issue
Jul 8, 2022
and output a valid result. Fixes exussum12#72
tomalec
added a commit
to tomalec/coverageChecker
that referenced
this issue
Jul 8, 2022
exussum12
pushed a commit
that referenced
this issue
Aug 29, 2022
and output a valid result. Fixes #72
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I call
diffFilter
on an empty change set, it logs a "No lines found!" error but returns a0
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
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
The text was updated successfully, but these errors were encountered: