phpcs
Tokenize PHP, JavaScript, and CSS files to detect violations of a defined set of coding standards. More information: https://github.com/squizlabs/PHP_CodeSniffer.
- Sniff the specified directory for issues (defaults to the PEAR standard):
phpcs
- Display a list of installed coding standards:
phpcs -i
- Specify a coding standard to validate against:
phpcs --standard
- Specify comma-separated file extensions to include when sniffing:
phpcs --extensions
- Specify the format of the output report (e.g.
full,xml,json,summary):
phpcs --report
- Set configuration variables to be used during the process:
phpcs --config-set
- Specify a comma-separated list of files to load before processing:
phpcs --bootstrap
- Don't recurse into subdirectories:
phpcs -l
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
