-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Executing a the local phpcbf command does not fix files #38
Comments
I do not use phpcbf so I don't know how to do that. Maybe you can add args or something to tell phpcbf to use your local configuration. |
I've tried several combinations of isStdout and doesWriteToFile, and I can't quite get there. Here is my coc-settings.json file:
With the above, I get the option to re-load the corrected file. But if I use the following, nothing happens.
I confirmed that running |
what's you have to make sure |
I found doesWriteToFile under 'formatters field' at https://github.com/iamcco/diagnostic-languageserver Yes, I'm trying to learn how to direct phpcbf output to stdout. |
ohhhhhhh my fault. |
@iamcco Is it possible to pass If you can pass it as stdin, this problem may be solved.
|
Yep, by default it use the stdin. so it maybe works change the
PS. it will not use stdin when use |
I used Unfortunately, there seems to be no change in "newText" :(
|
https://github.com/iamcco/diagnostic-languageserver/blob/master/src/handles/handleFormat.ts#L50 seems like I know what happen. need to fix it. |
@iamcco I tried to skip that control part in diagnostic-languageserver and it was formatted correctly in phpcbf setting
log(OK)
|
I changed the diagnostic-languageserver to verify this. phpcbf seems to return 1 for "code". :(
|
I add
|
I have confirmed that |
Confirmed working here, as well. Thanks! |
Hello,
After much struggle I was able to make
phpcs
lint my WordPress files.The problem now is, is that
phpcbf
(The formatter) is not taking the local project configuration. The files get formatted but not to the correct standard.This is my complete
coc-settings.json
:The text was updated successfully, but these errors were encountered: