识别 PHP 未使用和未定义的变量 sublime [英] Identifying PHP unused and undefied variables sublime

查看:28
本文介绍了识别 PHP 未使用和未定义的变量 sublime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 sublimetext3 unregistered .我想知道如何配置 sublime 以在 php 中显示未使用和未定义的变量 .sublimelinter-phplint 做了一些有用的工作,但它无法识别在开发过程中非常烦人的自动加载类.我正在寻找一些可以做到这一点的包文件范围.

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

  1. sublimelinter
  2. phpcs

3.sublime-phpcs

3.sublime-phpcs

有没有其他可以在开发中有用的包?

Is there anyother package that can be userful in developement ?

推荐答案

http://phpmd.org 将显示未使用的代码.还有一个 SublimeLinter-phpmd 扩展.只需安装 SublimeLinter 和此扩展程序,打开 SublimeLinter 的用户首选项,并将 phpmd 规则集减少到仅 "rulesets": "unusedcode" 以避免过度报告约定和您可能不会使用的内容.

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.

这篇关于识别 PHP 未使用和未定义的变量 sublime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆