-
Notifications
You must be signed in to change notification settings - Fork 185
variables - unused and undefined #374
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
|
This feature is the reason why i still use PhpStorm instead VSCode for PHP. |
This will have a small number of false positives for parameter references, which would become much smaller if type checking and possibly control flow analysis were introduced (E.g.
There's an open source plugin for a different project. That plugin performs unused variable detection, and only unused variable detection (Has some issues understanding references, loops and complex nested expressions right now, and is somewhat messy). It's a completely different AST format. An easy to implement (but slow) solution would be to convert the tolerant-php-parser AST to the other AST type that the mentioned plugin expects. A better solution would be to reimplement based on that design, targeting tolerant-php-parser. (The plugin is Apache licensed, the project the plugin is for is MIT licensed)
Until this issue is closed, this can be worked around by running both felixfbecker/php-language-server and another language server with the desired diagnostics, and disabling any redundant/conflicting features such as syntax error detection. |
Any news on this feature :) ? |
@JonGarbayo if there were news they would be posted here. Please use the subscribe feature, no need for polling ;) |
Sorry, it was just in case you forgot ;) |
This feature won't be implemented unless someone submits a PR, so there is no need to remind me personally ;) |
https://github.com/sirbrillig/phpcs-variable-analysis |
From @manwe-pl on May 9, 2017 13:27
Hi. Thanks for the extension. Two ideas from IntelliJ that you might consider:
Copied from original issue: felixfbecker/vscode-php-intellisense#120
The text was updated successfully, but these errors were encountered: