0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

すぐに忘れる phpcs を設定する際に使うコマンド

Posted at

※phpcsにpathが通っている前提です。

現在使用可能な規約

$ phpcs -i
The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1 and PSR12

自作ルールの格納ディレクトリを確認

$ phpcs --config-show
Using config file: /Users/hoge/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.conf

installed_paths: /Users/hoge/.phpcs
# installed_paths: 〜 が自作ルールを入れるフォルダ。

自作ルールの格納ディレクトリを指定

# installed_pathsは上書きされるので注意。(この場合 /Users/hoge/.phpcs の指定が消える。)
$ phpcs --config-set intalled_paths path/to/standarts/dir
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?