ucan-lab / tips

5 stars 0 forks source link

Mac VSCode phpcs #59

Open ucan-lab opened 6 years ago

ucan-lab commented 6 years ago

https://github.com/squizlabs/PHP_CodeSniffer

install

$ composer global require "squizlabs/php_codesniffer=*"

path

$ echo '# php composer installer' >> ~/.bash_profile
$ echo 'export PATH=$PATH:$HOME/.composer/vendor/bin' >> ~/.bash_profile
$ . ~/.bash_profile

vscode 拡張機能「phpcs」

インストールする。 command + , ユーザー設定に追記する。

{
  "phpcs.standard": "PSR2"
}