-
Notifications
You must be signed in to change notification settings - Fork 185
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
Formatter ignores installed_paths. #450
Comments
Hey @Vagr9K, We did a quick check and this issue looks very darn similar to
This could be a coincidence, but if any of these issues solves your problem then I did a good job 😄 If not, the maintainers will get to this issue shortly. Cheers, |
Sorry bot, but you failed miserably. |
I experienced the same issue when I today was working on a project that has a phpcs.xml file as part of the project. I found out that I can add the missing rulesets by calling the version of phpcs that is embedded in the extension with the Unfortunately, this only causes another error to appear. In Visual Studio Code, the following error now appears:
But if I run
I speculate that this might happen because the current builtin version of phpcs in the extension is 3.0.0RC3 (beta), while the wp-coding-standards page state v3.0.2 as the minimum version of phpcs. |
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
First of all, thanks for the great extension!
I'm trying to setup formatting for the Wordpress codebase.
wp-coding-standards/wpcs
andphpcs
are installed globally.Output of
phpcs --config-show
:phpcs -i
:My
phpcs.xml.dist
:phpcs -e
:Error inside VSCode:
NOTE: I can bypass the missing standard error by using the full path in
phpcs.xml.dist
:But the extension still fails:
Or when using
WordPress-Core
instead ofWordpress
:The text was updated successfully, but these errors were encountered: