File: phpcs.1

package info (click to toggle)
php-codesniffer 3.5.8-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,808 kB
  • sloc: php: 59,806; xml: 11,787; pascal: 6,386; javascript: 2,078; makefile: 9; sh: 8
file content (319 lines) | stat: -rw-r--r-- 4,990 bytes parent folder | download | duplicates (2)
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
.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)