-
-
Notifications
You must be signed in to change notification settings - Fork 189
Change exit code if no files were scanned #147
Comments
@DanielSchwiperich use:
¯_(ツ)_/¯ |
This will always return 0, also when files are scanned and errors / warnings are found.
|
as @DanielSchwiperich said - the workaround as proposed in #147 (comment) would work differently than what he wants He wants the command to exit with code
Of course the command should fail (as it already does) when clones have been found. Currently the phpcd command has two
Because both return code IMO either exit with code On the other hand changing this behaviour seems to be a BC-Break to me because some people might actually expect "no files found" to return an error code - not sure what the stance of @sebastianbergmann on this is. |
Happens again in 6.0.3: exit code is 1 when no files are found to scan. If error code should be 0 as this was a bug in 2017, I can provide a PR. |
I can confirm the same behaviour in 6.0.3. |
i'm experiencing the same thing with 6.0.3 |
phpcpd is giving an exit code of 1 if no files were found to scan.
This is different behaviour to similar tools like phpcs and phpmd.
It would be nice to have that behaviour changed so that's in line with those other tools.
(Useful in CI for example where the return values are evaluated and used to make a stage fail)
The text was updated successfully, but these errors were encountered: