すぐに忘れる phpcs を設定する際に使うコマンド
※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
$ 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
# installed_pathsは上書きされるので注意。(この場合 /Users/hoge/.phpcs の指定が消える。)
$ phpcs --config-set intalled_paths path/to/standarts/dir
Author And Source
この問題について(すぐに忘れる phpcs を設定する際に使うコマンド), 我々は、より多くの情報をここで見つけました https://qiita.com/shuuuta/items/f10cdc70e2db9baabc1e著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .