最近项目加上了校验规则,你懂的
phpcs
安装 phpcs
pear install php_codesniffer
使用
phpcs --config-set encoding=utf-8 phpcs --config-set tab_width=4 phpcs --config-set show_warings=0 phpcs --config-show array ( [encoding] => utf-8 [tab_width] => 4 [show_warnings] => 0 ) phpcs -s *.php
由于项目中校验了 doc comment,file comment ,我使用了
doxygentoolkit.vim
插件做function comment,但是对于 file comment,doc comment 来说doxygentoolkit 并不满足我的项目
于是我花了一点时间用 python 写了一个小的 vim 插件,专门添加符合我需求的注释,
commentvim.vim git hub 地址 : https://github.com/childeyin/vim-comment-plugin
原文地址:php_codesniffer 格式校验规则, 感谢原作者分享。
