src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleChecker.html

branch
eric7
changeset 10479
856476537696
parent 10437
2f70ca07f0af
child 10595
59579e8aff98
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleChecker</h1> 9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleChecker</h1>
10
11 <p> 10 <p>
12 Module implementing the code style checker. 11 Module implementing the code style checker.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15
16 <table> 15 <table>
17 <tr><td>None</td></tr> 16 <tr><td>None</td></tr>
18 </table> 17 </table>
18
19 <h3>Classes</h3> 19 <h3>Classes</h3>
20 20 <table>
21 <table>
22
23 <tr> 21 <tr>
24 <td><a href="#CodeStyleCheckerReport">CodeStyleCheckerReport</a></td> 22 <td><a href="#CodeStyleCheckerReport">CodeStyleCheckerReport</a></td>
25 <td>Class implementing a special report to be used with our dialog.</td> 23 <td>Class implementing a special report to be used with our dialog.</td>
26 </tr> 24 </tr>
27 </table> 25 </table>
26
28 <h3>Functions</h3> 27 <h3>Functions</h3>
29 28 <table>
30 <table>
31
32 <tr> 29 <tr>
33 <td><a href="#__checkCodeStyle">__checkCodeStyle</a></td> 30 <td><a href="#__checkCodeStyle">__checkCodeStyle</a></td>
34 <td>Private module function to perform the source code style check and/or fix found errors.</td> 31 <td>Private module function to perform the source code style check and/or fix found errors.</td>
35 </tr> 32 </tr>
36 <tr> 33 <tr>
68 <tr> 65 <tr>
69 <td><a href="#workerTask">workerTask</a></td> 66 <td><a href="#workerTask">workerTask</a></td>
70 <td>Module function acting as the parallel worker for the style check.</td> 67 <td>Module function acting as the parallel worker for the style check.</td>
71 </tr> 68 </tr>
72 </table> 69 </table>
70
73 <hr /> 71 <hr />
74 <hr /> 72 <hr />
75 <a NAME="CodeStyleCheckerReport" ID="CodeStyleCheckerReport"></a> 73 <a NAME="CodeStyleCheckerReport" ID="CodeStyleCheckerReport"></a>
76 <h2>CodeStyleCheckerReport</h2> 74 <h2>CodeStyleCheckerReport</h2>
77
78 <p> 75 <p>
79 Class implementing a special report to be used with our dialog. 76 Class implementing a special report to be used with our dialog.
80 </p> 77 </p>
78
81 <h3>Derived from</h3> 79 <h3>Derived from</h3>
82 pycodestyle.BaseReport 80 pycodestyle.BaseReport
83 <h3>Class Attributes</h3> 81 <h3>Class Attributes</h3>
84
85 <table> 82 <table>
86 <tr><td>None</td></tr> 83 <tr><td>None</td></tr>
87 </table> 84 </table>
85
88 <h3>Class Methods</h3> 86 <h3>Class Methods</h3>
89
90 <table> 87 <table>
91 <tr><td>None</td></tr> 88 <tr><td>None</td></tr>
92 </table> 89 </table>
90
93 <h3>Methods</h3> 91 <h3>Methods</h3>
94 92 <table>
95 <table>
96
97 <tr> 93 <tr>
98 <td><a href="#CodeStyleCheckerReport.__init__">CodeStyleCheckerReport</a></td> 94 <td><a href="#CodeStyleCheckerReport.__init__">CodeStyleCheckerReport</a></td>
99 <td>Constructor</td> 95 <td>Constructor</td>
100 </tr> 96 </tr>
101 <tr> 97 <tr>
102 <td><a href="#CodeStyleCheckerReport.error_args">error_args</a></td> 98 <td><a href="#CodeStyleCheckerReport.error_args">error_args</a></td>
103 <td>Public method to collect the error messages.</td> 99 <td>Public method to collect the error messages.</td>
104 </tr> 100 </tr>
105 </table> 101 </table>
102
106 <h3>Static Methods</h3> 103 <h3>Static Methods</h3>
107
108 <table> 104 <table>
109 <tr><td>None</td></tr> 105 <tr><td>None</td></tr>
110 </table> 106 </table>
107
111 108
112 <a NAME="CodeStyleCheckerReport.__init__" ID="CodeStyleCheckerReport.__init__"></a> 109 <a NAME="CodeStyleCheckerReport.__init__" ID="CodeStyleCheckerReport.__init__"></a>
113 <h4>CodeStyleCheckerReport (Constructor)</h4> 110 <h4>CodeStyleCheckerReport (Constructor)</h4>
114 <b>CodeStyleCheckerReport</b>(<i>options</i>) 111 <b>CodeStyleCheckerReport</b>(<i>options</i>)
115
116 <p> 112 <p>
117 Constructor 113 Constructor
118 </p> 114 </p>
115
119 <dl> 116 <dl>
120 117
121 <dt><i>options</i> (optparse.Values)</dt> 118 <dt><i>options</i> (optparse.Values)</dt>
122 <dd> 119 <dd>
123 options for the report 120 options for the report
124 </dd> 121 </dd>
125 </dl> 122 </dl>
126 <a NAME="CodeStyleCheckerReport.error_args" ID="CodeStyleCheckerReport.error_args"></a> 123 <a NAME="CodeStyleCheckerReport.error_args" ID="CodeStyleCheckerReport.error_args"></a>
127 <h4>CodeStyleCheckerReport.error_args</h4> 124 <h4>CodeStyleCheckerReport.error_args</h4>
128 <b>error_args</b>(<i>line_number, offset, errorCode, check, *args</i>) 125 <b>error_args</b>(<i>line_number, offset, errorCode, check, *args</i>)
129
130 <p> 126 <p>
131 Public method to collect the error messages. 127 Public method to collect the error messages.
132 </p> 128 </p>
129
133 <dl> 130 <dl>
134 131
135 <dt><i>line_number</i> (int)</dt> 132 <dt><i>line_number</i> (int)</dt>
136 <dd> 133 <dd>
137 line number of the issue 134 line number of the issue
169 <hr /> 166 <hr />
170 <hr /> 167 <hr />
171 <a NAME="__checkCodeStyle" ID="__checkCodeStyle"></a> 168 <a NAME="__checkCodeStyle" ID="__checkCodeStyle"></a>
172 <h2>__checkCodeStyle</h2> 169 <h2>__checkCodeStyle</h2>
173 <b>__checkCodeStyle</b>(<i>filename, source, args</i>) 170 <b>__checkCodeStyle</b>(<i>filename, source, args</i>)
174
175 <p> 171 <p>
176 Private module function to perform the source code style check and/or fix 172 Private module function to perform the source code style check and/or fix
177 found errors. 173 found errors.
178 </p> 174 </p>
175
179 <dl> 176 <dl>
180 177
181 <dt><i>filename</i> (str)</dt> 178 <dt><i>filename</i> (str)</dt>
182 <dd> 179 <dd>
183 source filename 180 source filename
226 <hr /> 223 <hr />
227 <hr /> 224 <hr />
228 <a NAME="__checkSyntax" ID="__checkSyntax"></a> 225 <a NAME="__checkSyntax" ID="__checkSyntax"></a>
229 <h2>__checkSyntax</h2> 226 <h2>__checkSyntax</h2>
230 <b>__checkSyntax</b>(<i>filename, source</i>) 227 <b>__checkSyntax</b>(<i>filename, source</i>)
231
232 <p> 228 <p>
233 Private module function to perform a syntax check. 229 Private module function to perform a syntax check.
234 </p> 230 </p>
231
235 <dl> 232 <dl>
236 233
237 <dt><i>filename</i> (str)</dt> 234 <dt><i>filename</i> (str)</dt>
238 <dd> 235 <dd>
239 source filename 236 source filename
261 <hr /> 258 <hr />
262 <hr /> 259 <hr />
263 <a NAME="codeStyleBatchCheck" ID="codeStyleBatchCheck"></a> 260 <a NAME="codeStyleBatchCheck" ID="codeStyleBatchCheck"></a>
264 <h2>codeStyleBatchCheck</h2> 261 <h2>codeStyleBatchCheck</h2>
265 <b>codeStyleBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) 262 <b>codeStyleBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>)
266
267 <p> 263 <p>
268 Module function to check source code style for a batch of files. 264 Module function to check source code style for a batch of files.
269 </p> 265 </p>
266
270 <dl> 267 <dl>
271 268
272 <dt><i>argumentsList</i> (list)</dt> 269 <dt><i>argumentsList</i> (list)</dt>
273 <dd> 270 <dd>
274 list of arguments tuples as given for codeStyleCheck 271 list of arguments tuples as given for codeStyleCheck
294 <hr /> 291 <hr />
295 <hr /> 292 <hr />
296 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a> 293 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a>
297 <h2>codeStyleCheck</h2> 294 <h2>codeStyleCheck</h2>
298 <b>codeStyleCheck</b>(<i>filename, source, args</i>) 295 <b>codeStyleCheck</b>(<i>filename, source, args</i>)
299
300 <p> 296 <p>
301 Do the source code style check and/or fix found errors. 297 Do the source code style check and/or fix found errors.
302 </p> 298 </p>
299
303 <dl> 300 <dl>
304 301
305 <dt><i>filename</i> (str)</dt> 302 <dt><i>filename</i> (str)</dt>
306 <dd> 303 <dd>
307 source filename 304 source filename
340 <hr /> 337 <hr />
341 <hr /> 338 <hr />
342 <a NAME="extractLineFlags" ID="extractLineFlags"></a> 339 <a NAME="extractLineFlags" ID="extractLineFlags"></a>
343 <h2>extractLineFlags</h2> 340 <h2>extractLineFlags</h2>
344 <b>extractLineFlags</b>(<i>line, startComment="</i>) 341 <b>extractLineFlags</b>(<i>line, startComment="</i>)
345
346 <p> 342 <p>
347 Function to extract flags starting and ending with '__' from a line 343 Function to extract flags starting and ending with '__' from a line
348 comment. 344 comment.
349 </p> 345 </p>
346
350 <dl> 347 <dl>
351 348
352 <dt><i>line</i> (str)</dt> 349 <dt><i>line</i> (str)</dt>
353 <dd> 350 <dd>
354 line to extract flags from 351 line to extract flags from
382 <hr /> 379 <hr />
383 <hr /> 380 <hr />
384 <a NAME="ignoreCode" ID="ignoreCode"></a> 381 <a NAME="ignoreCode" ID="ignoreCode"></a>
385 <h2>ignoreCode</h2> 382 <h2>ignoreCode</h2>
386 <b>ignoreCode</b>(<i>errorCode, lineFlags</i>) 383 <b>ignoreCode</b>(<i>errorCode, lineFlags</i>)
387
388 <p> 384 <p>
389 Function to check, if the given code should be ignored as per line flags. 385 Function to check, if the given code should be ignored as per line flags.
390 </p> 386 </p>
387
391 <dl> 388 <dl>
392 389
393 <dt><i>errorCode</i> (str)</dt> 390 <dt><i>errorCode</i> (str)</dt>
394 <dd> 391 <dd>
395 error code to be checked 392 error code to be checked
415 <hr /> 412 <hr />
416 <hr /> 413 <hr />
417 <a NAME="initBatchService" ID="initBatchService"></a> 414 <a NAME="initBatchService" ID="initBatchService"></a>
418 <h2>initBatchService</h2> 415 <h2>initBatchService</h2>
419 <b>initBatchService</b>(<i></i>) 416 <b>initBatchService</b>(<i></i>)
420
421 <p> 417 <p>
422 Initialize the batch service and return the entry point. 418 Initialize the batch service and return the entry point.
423 </p> 419 </p>
420
424 <dl> 421 <dl>
425 <dt>Return:</dt> 422 <dt>Return:</dt>
426 <dd> 423 <dd>
427 the entry point for the background client 424 the entry point for the background client
428 </dd> 425 </dd>
437 <hr /> 434 <hr />
438 <hr /> 435 <hr />
439 <a NAME="initService" ID="initService"></a> 436 <a NAME="initService" ID="initService"></a>
440 <h2>initService</h2> 437 <h2>initService</h2>
441 <b>initService</b>(<i></i>) 438 <b>initService</b>(<i></i>)
442
443 <p> 439 <p>
444 Initialize the service and return the entry point. 440 Initialize the service and return the entry point.
445 </p> 441 </p>
442
446 <dl> 443 <dl>
447 <dt>Return:</dt> 444 <dt>Return:</dt>
448 <dd> 445 <dd>
449 the entry point for the background client 446 the entry point for the background client
450 </dd> 447 </dd>
459 <hr /> 456 <hr />
460 <hr /> 457 <hr />
461 <a NAME="securityOk" ID="securityOk"></a> 458 <a NAME="securityOk" ID="securityOk"></a>
462 <h2>securityOk</h2> 459 <h2>securityOk</h2>
463 <b>securityOk</b>(<i>errorCode, lineFlags</i>) 460 <b>securityOk</b>(<i>errorCode, lineFlags</i>)
464
465 <p> 461 <p>
466 Function to check, if the given error code is an acknowledged security report. 462 Function to check, if the given error code is an acknowledged security report.
467 </p> 463 </p>
464
468 <dl> 465 <dl>
469 466
470 <dt><i>errorCode</i> (str)</dt> 467 <dt><i>errorCode</i> (str)</dt>
471 <dd> 468 <dd>
472 error code to be checked 469 error code to be checked
492 <hr /> 489 <hr />
493 <hr /> 490 <hr />
494 <a NAME="workerTask" ID="workerTask"></a> 491 <a NAME="workerTask" ID="workerTask"></a>
495 <h2>workerTask</h2> 492 <h2>workerTask</h2>
496 <b>workerTask</b>(<i>inputQueue, outputQueue</i>) 493 <b>workerTask</b>(<i>inputQueue, outputQueue</i>)
497
498 <p> 494 <p>
499 Module function acting as the parallel worker for the style check. 495 Module function acting as the parallel worker for the style check.
500 </p> 496 </p>
497
501 <dl> 498 <dl>
502 499
503 <dt><i>inputQueue</i> (multiprocessing.Queue)</dt> 500 <dt><i>inputQueue</i> (multiprocessing.Queue)</dt>
504 <dd> 501 <dd>
505 input queue 502 input queue

eric ide

mercurial