LoginSignup
1
5

More than 5 years have passed since last update.

AtomでPHPCS/PHPMDを活用

Posted at

環境

  • macOS Sierra Version 10.12.4
  • PHP_CodeSniffer version 3.0.0 (stable) by Squiz (http://www.squiz.net)
  • PHPMD 2.6.0

AtomのLint準備

$ apm install busy-signal
$ apm install linter
$ apm install linter-ui-default

PHP_CodeSniffer

インストール

$ composer global require "squizlabs/php_codesniffer=*"
$ exec $SHELL -l
$ which phpcs
~/.anyenv/envs/phpenv/shims/phpcs

Atomプラグイン

$ apm install linter-phpcs

PHP Mess Detector

インストール

$ composer global require "phpmd/phpmd"

Atomプラグイン

$ apm install linter-phpmd

AtomでPHP適当に書いたらちゃんと警告出してくれた。

1
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
5