Identifying PHP unused and undefied variables sublime

余生颓废 提交于 2019-12-23 09:27:49

问题


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

  1. sublimelinter
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!