Identifying PHP unused and undefied variables subl

2019-06-18 08: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 ?

2条回答
SAY GOODBYE
2楼-- · 2019-06-18 09:43

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.

查看更多
地球回转人心会变
3楼-- · 2019-06-18 09:45

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

查看更多
登录 后发表回答