我試圖使用PHP CodeSniffer + CakePHP Sniffer + Eclipse PHP Tool Integration如何在Eclipse中爲CakePHP設置PHP CodeSniffer + Formartter配置文件?
我安裝Eclipse插件以及下載和我的Eclipse安裝CakePHP的CodeSniffer代碼,你可以下面的圖片上看到的。
我選擇print PHP output to console
這樣我就可以看到和錯誤,當它試圖分析我的代碼
PHP Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff PSR2.Namespaces.NamespaceDeclaration does not exist' in /home/israel/.eclipse/org.eclipse.platform_4.3.0_1473617060_linux_gtk_x86_64/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php:814
可能是什麼問題呢?
另一方面,我希望能夠遵循CakePHP約定來格式化代碼,我可以在哪裏找到與CakePHP代碼約定匹配的fomatter profile
。
感謝
所以你有沒有發現任何好的格式化的個人資料? – DIDoS
什麼都沒有!我試圖用Eclipse Formatter來構建自己的,但在那裏有很多事情你不能做到匹配約定:S – ZoT