naopusyu / phpcs-custom-rules
Custom rules for PHP_CodeSniffer
Package info
github.com/naopusyu/phpcs-custom-rules
Type:phpcodesniffer-standard
pkg:composer/naopusyu/phpcs-custom-rules
0.6.0
2026-03-12 22:17 UTC
Requires
- squizlabs/php_codesniffer: ^3.11
Requires (Dev)
- phpunit/phpunit: ^11.5
README
PHP_CodeSnifferのカスタムルールを作ってみた
Installation
composer req naopusyu/phpcs-custom-rules --dev
Usage
Create phpcs.xml file.
<?xml version="1.0"?> <ruleset> <arg name="colors" /> <arg value="ps" /> <rule ref="vendor/naopusyu/phpcs-custom-rules/src/PHPCSCustomRules/ruleset.xml"/> </ruleset>
Then run the phpcs command.
vendor/bin/phpcs src