tarosky / coding-standards
Tarosky Coding Standards for WordPress projects, using PHP_CodeSniffer ruleset.
Installs: 4 411
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 9
Type:phpcodesniffer-standard
pkg:composer/tarosky/coding-standards
Requires
Requires (Dev)
- phpcompatibility/php-compatibility: dev-develop as 9.99.99
- dev-main
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-copilot/update-composer-dependencies-again
- dev-copilot/add-dependabot-configuration
- dev-copilot/update-composer-dependencies
- dev-fumikito-patch-1
- dev-issue+22
- dev-issue+18
- dev-update/phpcompatibility
- dev-update/packages
- dev-issue+8_2
- dev-issue+8
- dev-prepare-initial-release
- dev-issue+2
- dev-init-dev
This package is auto-updated.
Last update: 2025-12-19 04:03:24 UTC
README
Tarosky coding standards
インストール
Composer でインストールします。
composer require --dev tarosky/coding-standards
最後に下記のような確認メッセージが表示される場合は、 y を入力してください。
dealerdirect/phpcodesniffer-composer-installer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "dealerdirect/phpcodesniffer-composer-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]
インストールが完了した composer.json には下記のようになっているはずです。
{
"require-dev": {
// ... 他のパッケージ
"tarosky/coding-standards": "^1.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
使い方
コマンドで実行する場合は、以下のようにします。
./vendor/bin/phpcs --standard=Tarosky .
composer.json にスクリプトを設定しておくことで、より簡単なコマンドで実行ができます。
下記の例では composer lint で phpcs を使ったコードチェックを、 composer fix で phpcbf を使った自動修正を実行できます。
"scripts": { "lint": "phpcs --standard=Tarosky .", "fix": "phpcbf --standard=Tarosky ." },
さらに、composer lint は GitHub Actions 等のCIツールを利用して、コミット時やプルリクエスト時に必ず実行されるようにしておくと、開発チーム全体でコードチェック漏れを防ぐことができます。