File: phpcs.1

package info (click to toggle)
php-codesniffer 2.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,460 kB
  • ctags: 8,660
  • sloc: php: 40,311; xml: 9,505; pascal: 3,365; makefile: 16; sh: 6
file content (255 lines) | stat: -rw-r--r-- 4,007 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
.TH phpcs 1 "2016-04-06"
.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 [ \-\-stdin-path=\c
.IR stdinPath ]
.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 [ \-\-exclude=\c
.IR sniffs ]
.RB [ \-\-encoding=\c
.IR encoding ]
.RB [ \-\-extensions=\c
.IR extensions
.RB [ \-\-ignore=\c
.IR patterns ]
.RB [ \-\-bootstrap=\c
.IR bootstrap ]
.RB [ \-\-file\-list=\c
.IR fileList ]
.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 fileList
.IP
A file containing a list of files and/or directories to check (one per line)

.LP
.I stdinPath
.IP
If processing STDIN, the file path that STDIN will be processed as

.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
(extension filtering only valid when checking a directory).
The type of the file can be specified using: ext/type
e.g., module/php,es/js

.LP
.I generator
.IP
Uses 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 report
.IP
Print either the
.BR full ,
.BR xml ,
.BR checkstyle ,
.BR csv ,
.BR json ,
.BR emacs ,
.BR source ,
.BR summary ,
.BR diff ,
.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
or set to "auto" to use current screen width, where supported

.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 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


.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
.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

.LP
.B \-\-colors
.IP
Use colors in output

.LP
.B \-\-no\-colors
.IP
Do not use colors in output (this is the default)

.SH "SEE ALSO"
.BR phpcbf (1)