當我嘗試創建它時,我會在我的測試類中看到警告。我不想爲測試類創建PHPDoc和更多,但PhpStorm向我顯示警告,因爲PhpStorm無法將測試類標記爲phpcs的排除。PhpStorm phpspec代碼嗅探器忽略測試文件夾
如何我跑我phpcs爲驗證我的類編碼標準:
php bin/phpcs ./src -p --encoding=utf-8 --extensions=php --ignore=Tests --standard=./vendor/escapestudios/symfony2-coding-standard/Symfony2
如何實現它的PhpStorm 2016年3月2日? 我嘗試創建配置:在PhpStorm
<target name="phpcs-ci"
description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server">
<exec executable="phpcs" output="/dev/null">
<arg value="--encoding=utf-8" />
<arg value="--extensions=php" />
<arg value="--ignore=Tests" />
<arg value="--standard=./vendor/escapestudios/symfony2-coding-standard/Symfony2" />
<arg path="${basedir}" />
</exec>
</target>
可否請你澄清你在這裏需要什麼。據我瞭解,到目前爲止,您希望禁用代碼嗅探器(PhpStorm集成)爲您的測試文件(無論原因 - 無所謂),但仍然繼續運行它爲您的其他代碼。我對麼? – LazyOne
是的,你是對的。 –