Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

When I run phpcbf with stdin, the exit code is "1" instead of 0 #3367

Closed
yaegassy opened this issue May 25, 2021 · 2 comments
Closed

When I run phpcbf with stdin, the exit code is "1" instead of 0 #3367

yaegassy opened this issue May 25, 2021 · 2 comments

Comments

@yaegassy
Copy link

Describe the bug

In the case of stdin, the exit code always seems to be 1.

Is this behavior a bug?

Code sample

<?php

function dummy() {
    return "dummy";
}

Custom ruleset

None

To reproduce

$ phpcbf --version
PHP_CodeSniffer version 3.6.0 (stable) by Squiz (http://www.squiz.net)
$ cat sample.php
<?php
function dummy() {
    return "dummy";
}
$ cat sample.php | phpcbf
<?php

function dummy()
{
    return "dummy";
}
$ echo $?
1
@jrfnl
Copy link
Contributor

jrfnl commented May 25, 2021

Duplicate of #1359, #2954, #3057. Also see #1818 (comment), This is on the roadmap for PHPCS 4.0 as per #2898.

@yaegassy
Copy link
Author

Thanks reply. This seems to be a duplicate issue, so I will close my issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants