-
Notifications
You must be signed in to change notification settings - Fork 185
Error when format document #296
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
Comments
Can you provide the file you tried to format? |
sure. but it not opensource code. you can write mail to my mail.
hufeng1987@gmail.com
and i will mail one to you . and you need keep it in secret. or should
delete it after use
Appreciate your time.
----------------------------
Netroby
2017-02-13 16:46 GMT+08:00 Felix Becker <notifications@github.com>:
… Can you provide the file you tried to format?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#296 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAQ-iSRpVohbuEqZS8Ewg05SPSBGy4hpks5rcBh1gaJpZM4L-4Pz>
.
|
I am having the same problem here is the code in the file:
|
I use vscode on windows and have installed PHP IntelliSense v1.1.4 and the PHP Formatter v0.2.4 extension which uses php-cs-fixer for formatting the code. I've configured it to run on save and this error shows every time I save the file and there is nothing to fix by the formatter. If I have incorrect formatting the formatter fixes it and the error doesn't show up. |
@felixfbecker I have noticed that this happens whenever there is a phpcs error. For example, the following code causes the -32603 error.
And phpcs will have the following error
But if I fix the error and change it to the following
I am then able to save the file and the formatting/validation is run correctly. |
@kyle-mccarthy Yes! that's happening because of phpcs, is there anyway to ignore it ? |
Same thing over here. |
At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases, overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway. BREAKING CHANGE: removes formatting support closes #501 closes #474 closes #473 closes #468 closes #450 closes #445 closes #443 closes #423 closes #343 closes #296 closes #293 closes #499 closes #471
At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases, overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway. BREAKING CHANGE: removes formatting support closes felixfbecker#501 closes felixfbecker#474 closes felixfbecker#473 closes felixfbecker#468 closes felixfbecker#450 closes felixfbecker#445 closes felixfbecker#443 closes felixfbecker#423 closes felixfbecker#343 closes felixfbecker#296 closes felixfbecker#293 closes felixfbecker#499 closes felixfbecker#471
The text was updated successfully, but these errors were encountered: