dshxbrzgi090608692 2019-02-11 19:30
浏览 246
已采纳

PhpStorm的代码检查器可以从命令行运行吗?

I'm attempting to implement some quality control on a project, and I've removed all warnings for my project according to a specific profile in the PhpStorm code inspector. Now I want to set up an automated check (maybe a git hook or Jenkins job) so that people don't add additional warnings.

Basically, what I need to do is to run PhpStorm's code > inspect functionality from the command line.

It appears that, by default, PhpStorm uses some kind of internal code inspection tool when I run code > inspect code. It has plugins for PHP Code Sniff and others, but I don't really want to use those. For example, PHP Code Sniff finds all kinds of spacing errors and such (it's a linter, after all), but it doesn't detect things like passing the wrong number of arguments to method signatures (i.e. the stuff I really care about).

So, is there any way to run PhpStorm's code inspection external to PhpStorm?

  • 写回答

1条回答 默认 最新

  • dongyuzhu2244 2019-02-11 19:35
    关注

    Hmmm...

    Looks like posting this question may have given me the clarity I needed to search for the correct answer. Looks like there's a way to do this outlined in the PHPStorm documentation:

    https://www.jetbrains.com/help/phpstorm/command-line-code-inspector.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站