我有一个php文件,我通过phpcs运行。它成功完成并报告说phpcbf可以修复1199个问题。但是,当我运行phpcbf时,它出错了,没有解释看起来像过程的结束。如果我删除文件中大约一半的代码,它将成功运行。我尝试过使用和不使用开关--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