1

我有一个通过 phpcs 运行的 php 文件。它成功完成并报告 phpcbf 可以修复 1199 个问题。但是,当我运行 phpcbf 时,它会出错,并且在进程结束时没有任何解释。如果我删除文件中大约一半的代码,它将成功运行。我尝试过使用和不使用 switch --no-patch。我已经尝试过-vv-v(前者是我在论坛中找到的,后者是我自己尝试的)。他们似乎什么也没做。我想知道是否有任何方法可以打印出更多细节,这样我就可以看到它卡在了什么地方?下面是我运行的命令的一些片段。谢谢

[...]
1478 | ERROR   | [x] There must be no blank line following an inline
      |         |     comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1199 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 414ms; Memory: 16.5Mb
[...]
C:\Users\name>phpcbf phpFile.php --no-patch
Changing into directory C:\Users\name
Processing CaseModel.php [PHP => 12094 tokens in 1468 lines]... DONE in 329ms (1204 fixable violations)
        => Fixing file: 1/1204 violations remaining [made 50 passes]... ERROR in 29.67 secs
Fixed 0 files
Time: 30.06 secs; Memory: 49.5Mb
C:\Users\name>phpcbf CaseModel.php
Changing into directory C:\Users\name
Processing CaseModel.php [PHP => 12094 tokens in 1468 lines]... DONE in 328ms (1204 fixable violations)
        => Fixing file: 1/1204 violations remaining [made 50 passes]... [31mERROR[0m in 30.12 secs
No fixable errors were found
Time: 30.51 secs; Memory: 49.5Mb
4

0 回答 0