问题
I am using sublimetext3 unregistered . I want to know how can I configure sublime to show unused and undefined variables in php .sublimelinter-phplint does some useful work but it cannot recognise autoloaded classes that can be very irritating while development .I am looking for some package that can do it with file scope.
I have following packages already installed
- sublimelinter
phpcs
3.sublime-phpcs
Is there anyother package that can be userful in developement ?
回答1:
http://phpmd.org will show unused code. there is a SublimeLinter-phpmd extension as well. Just install both SublimeLinter and this extension, open the User preferences for SublimeLinter, and reduce the phpmd rulesets to just "rulesets": "unusedcode" to avoid over reporting on conventions and such you might not use.
回答2:
SublimeLinter works quite well but for php I use an extension :
https://github.com/SublimeLinter/SublimeLinter-php
You need SublimeLinter 3 for this : http://sublimelinter.readthedocs.org/en/latest/installation.html Which i see you already have! ^^
Appart from that.. Another IDE ? ^^
A Note about another editor which has a LOT of tools.. ATOM
来源:https://stackoverflow.com/questions/28679370/identifying-php-unused-and-undefied-variables-sublime