.TH phpcs 1 "2014-07-21" .SH NAME phpcs - PHP code sniffer CLI tool .SH SYNOPSIS .B phpcs .RB [ \-nwlsaepvi ] .RB [ \-d .IR key [\c .BI = value\c .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 [ \-\-generator=\c .IR generator ] .RB [ \-\-tab\-width=\c .IR tabWidth ] .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 [ \-\-encoding=\c .IR encoding ] .RB [ \-\-extensions=\c .IR extensions .RB [ \-\-ignore=\c .IR patterns ] .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 file .IP One or more files and/or directories to check .LP .I extensions .IP A comma separated list of file extensions to check (only valid if checking a directory) .LP .I patterns .IP A comma separated list of patterns to ignore files and directories .LP .I encoding .IP The encoding of the files being checked (default is iso-8859-1) .LP .I sniffs .IP A comma separated list of sniff codes to limit the check to (all sniffs must be part of the specified standard) .LP .I severity .IP The minimum severity required to display an error or warning .LP .I standard .IP The name or path of the coding standard to use .LP .I tabWidth .IP The number of spaces each tab represents .LP .I generator .IP The name of a doc generator to use (forces doc generation instead of checking) .LP .I report .IP Print either the .BR full , .BR xml , .BR checkstyle , .BR csv , .BR json , .BR emacs , .BR source , .BR summary , .BR svnblame , .BR gitblame , .BR hgblame , or .BR notifysend report (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 .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 (on by 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 .BR \-v [ v ][ v ] .IP Print verbose output .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 .SH "SEE ALSO" .BR phpcbf (1)