.TH phpcs 1 "2018-02-27" .SH NAME phpcs - PHP code sniffer CLI tool .SH SYNOPSIS .B phpcs .RB [ \-nwlsaepqvi ] .RB [ \-d .IR key [\c .BI = value\c .RB ]] .RB [ \-\-colors ] .RB [ \-\-no\-colors ] .RB [ \-\-cache=\c .IR cacheFile ] .RB [ \-\-no\-cache ] .RB [ \-\-tab\-width=\c .IR tabWidth ] .RB [ \-\-report=\c .IR report ] .RB [ \-\-report\-file=\c .IR reportFile ] .RB [ \-\-report\-\c .IB report =\c .IR reportFile ] .RB [ \-\-report\-width=\c .IR reportWidth ] .RB [ \-\-basepath=\c .IR basepath ] .RB [ \-\-bootstrap=\c .IR bootstrap ] .RB [ \-\-severity=\c .IR severity ] .RB [ \-\-error\-severity=\c .IR severity ] .RB [ \-\-warning\-severity=\c .IR severity ] .RB [ \-\-runtime\-set .IR key\ value ] .RB [ \-\-config\-set .IR key\ value ] .RB [ \-\-config\-delete .IR key ] .RB [ \-\-config\-show ] .RB [ \-\-standard=\c .IR standard ] .RB [ \-\-sniffs=\c .IR sniffs ] .RB [ \-\-exclude=\c .IR sniffs ] .RB [ \-\-encoding=\c .IR encoding ] .RB [ \-\-parallel=\c .IR processes ] .RB [ \-\-generator=\c .IR generator ] .RB [ \-\-extensions=\c .IR extensions .RB [ \-\-ignore=\c .IR patterns ] .RB [ \-\-ignore-annotations ] .RB [ \-\-stdin-path=\c .IR stdinPath ] .RB [ \-\-file\-list=\c .IR fileList ] .RB [ \-\-filter=\c .IR filter ] .IR file \ \.\.\. .SH DESCRIPTION .LP .I phpcs (or PHP_CodeSniffer) is a PHP5 script that tokenises PHP, JavaScript and CSS files to detect violations of a defined coding standard. It is an essential development tool that ensures your code remains clean and consistent. It can also help prevent some common semantic errors made by developers. .SH PARAMETERS .LP .I cacheFile .IP Use a specific file for caching (uses a temporary file by default) .LP .I basepath .IP A path to strip from the front of file paths inside reports .LP .I bootstrap .IP A comma separated list of files to run before processing starts .LP .I encoding .IP The encoding of the files being checked (default is iso-8859-1) .LP .I extensions .IP A comma separated list of file extensions to check. The type of the file can be specified using: ext/type e.g., module/php,es/js .LP .I file .IP One or more files and/or directories to check .LP .I fileList .IP A file containing a list of files and/or directories to check (one per line) .LP .I filter .IP Use either the "gitmodified" or "gitstaged" filter, or specify the path to a custom filter class .LP .I generator .IP Use either the "HTML", "Markdown" or "Text" generator (forces documentation generation instead of checking) .LP .I patterns .IP A comma separated list of patterns to ignore files and directories .LP .I processes .IP How many files should be checked simultaneously (default is 1) .LP .I report .IP Print either the .BR full , .BR xml , .BR checkstyle , .BR csv , .BR json , .BR junit , .BR emacs , .BR source , .BR summary , .BR diff , .BR svnblame , .BR gitblame , .BR hgblame , or .BR notifysend report, or specify the path to a custom report class (the .BR full report is printed by default) .LP .I reportFile .IP Write the report to the specified file path .LP .I reportWidth .IP How many columns wide screen reports should be printed or set to "auto" to use current screen width, where supported .LP .I severity .IP The minimum severity required to display an error or warning .LP .I sniffs .IP A comma separated list of sniff codes to include or exclude during checking (all sniffs must be part of the specified standard) .LP .I standard .IP The name or path of the coding standard to use .LP .I stdinPath .IP If processing STDIN, the file path that STDIN will be processed as .LP .I tabWidth .IP The number of spaces each tab represents .SH OPTION .LP .B \-n .IP Do not print warnings (shortcut for .BR \-\-warning\-severity=0 ) .LP .B \-w .IP Print both warnings and errors (this is the default) .LP .B \-l .IP Local directory only, no recursion .LP .B \-s .IP Show sniff codes in all reports .LP .B \-a .IP Run interactively .LP .B \-e .IP Explain a standard by showing the sniffs it includes .LP .B \-p .IP Show progress of the run .LP .B \-q .IP Quiet mode; disables progress and verbose output .LP .B \-n .IP Stop error messages from being recorded (saves a lot of memory, but stops many reports from being used) .LP .BR \-v .IP Print processed files .LP .BR \-vv .IP Print ruleset and token output .LP .BR \-vvv .IP Print sniff processing information .LP .B \-i .IP Show a list of installed coding standards .LP .B \-d .IP Set the .I key php.ini value to .I value or .B true if .I value is omitted .LP .B \-\-help .IP Print the help message .LP .B \-\-version .IP Print version information .LP .B \-\-colors .IP Use colors in output .LP .B \-\-no\-colors .IP Do not use colors in output (this is the default) .LP .B \-\-cache .IP Cache results between runs .LP .B \-\-no\-cache .IP Do not cache results between runs (this is the default) .LP .B \-\-ignore\-annotations .IP Ignore all phpcs: annotations in code comments .SH "SEE ALSO" .BR phpcbf (1)