Closed chrishulton closed 7 years ago
Hm, this has since changed around in the other engine. Need to find a way to support the case where the results are empty. Maybe the bubbling up just isn't working.
Think I figured out what's going on here. Going to open a different PR.
When looking into some issues with this engine, one thing that seemed strange was that fatal errors were occurring, but the CLI was reporting "0 issues found" rather than exiting with an error, and the errors were only visible in debug mode.
I went to do some research on the issue, and saw that we had made a similar fix for this in a different php engine: https://github.com/barracudanetworks/forkdaemon-php/issues/26 https://github.com/codeclimate/codeclimate-phpcodesniffer/pull/38
We made most of the fix in https://github.com/codeclimate/codeclimate-phpmd/pull/21, but we need to add the
if (count($results) == 0)
check, because the logic that happens inside the loop to check the exception will not run if the length is 0.Can verify this change leads to the expected behavior.