29 |
29 |
30 <table> |
30 <table> |
31 |
31 |
32 <tr> |
32 <tr> |
33 <td><a href="#__checkCodeStyle">__checkCodeStyle</a></td> |
33 <td><a href="#__checkCodeStyle">__checkCodeStyle</a></td> |
34 <td>Private module function to perform the code style check and/or fix found errors.</td> |
34 <td>Private module function to perform the source code style check and/or fix found errors.</td> |
35 </tr> |
35 </tr> |
36 <tr> |
36 <tr> |
37 <td><a href="#__checkSyntax">__checkSyntax</a></td> |
37 <td><a href="#__checkSyntax">__checkSyntax</a></td> |
38 <td>Private module function to perform a syntax check.</td> |
38 <td>Private module function to perform a syntax check.</td> |
39 </tr> |
39 </tr> |
40 <tr> |
40 <tr> |
41 <td><a href="#codeStyleBatchCheck">codeStyleBatchCheck</a></td> |
41 <td><a href="#codeStyleBatchCheck">codeStyleBatchCheck</a></td> |
42 <td>Module function to check code style for a batch of files.</td> |
42 <td>Module function to check source code style for a batch of files.</td> |
43 </tr> |
43 </tr> |
44 <tr> |
44 <tr> |
45 <td><a href="#codeStyleCheck">codeStyleCheck</a></td> |
45 <td><a href="#codeStyleCheck">codeStyleCheck</a></td> |
46 <td>Do the code style check and/or fix found errors.</td> |
46 <td>Do the source code style check and/or fix found errors.</td> |
47 </tr> |
47 </tr> |
48 <tr> |
48 <tr> |
49 <td><a href="#extractLineFlags">extractLineFlags</a></td> |
49 <td><a href="#extractLineFlags">extractLineFlags</a></td> |
50 <td>Function to extract flags starting and ending with '__' from a line comment.</td> |
50 <td>Function to extract flags starting and ending with '__' from a line comment.</td> |
51 </tr> |
51 </tr> |
61 <td><a href="#initService">initService</a></td> |
61 <td><a href="#initService">initService</a></td> |
62 <td>Initialize the service and return the entry point.</td> |
62 <td>Initialize the service and return the entry point.</td> |
63 </tr> |
63 </tr> |
64 <tr> |
64 <tr> |
65 <td><a href="#securityOk">securityOk</a></td> |
65 <td><a href="#securityOk">securityOk</a></td> |
66 <td>Function to check, if the given code is an acknowledged security report.</td> |
66 <td></td> |
67 </tr> |
67 </tr> |
68 <tr> |
68 <tr> |
69 <td><a href="#workerTask">workerTask</a></td> |
69 <td><a href="#workerTask">workerTask</a></td> |
70 <td>Module function acting as the parallel worker for the style check.</td> |
70 <td>Module function acting as the parallel worker for the style check.</td> |
71 </tr> |
71 </tr> |
123 options for the report (optparse.Values) |
123 options for the report (optparse.Values) |
124 </dd> |
124 </dd> |
125 </dl> |
125 </dl> |
126 <a NAME="CodeStyleCheckerReport.error_args" ID="CodeStyleCheckerReport.error_args"></a> |
126 <a NAME="CodeStyleCheckerReport.error_args" ID="CodeStyleCheckerReport.error_args"></a> |
127 <h4>CodeStyleCheckerReport.error_args</h4> |
127 <h4>CodeStyleCheckerReport.error_args</h4> |
128 <b>error_args</b>(<i>line_number, offset, code, check, *args</i>) |
128 <b>error_args</b>(<i>line_number, offset, errorCode, check, *args</i>) |
129 |
129 |
130 <p> |
130 <p> |
131 Public method to collect the error messages. |
131 Public method to collect the error messages. |
132 </p> |
132 </p> |
133 <dl> |
133 <dl> |
138 </dd> |
138 </dd> |
139 <dt><i>offset</i></dt> |
139 <dt><i>offset</i></dt> |
140 <dd> |
140 <dd> |
141 position within line of the issue (integer) |
141 position within line of the issue (integer) |
142 </dd> |
142 </dd> |
143 <dt><i>code</i></dt> |
143 <dt><i>errorCode</i></dt> |
144 <dd> |
144 <dd> |
145 message code (string) |
145 error message code (string) |
146 </dd> |
146 </dd> |
147 <dt><i>check</i></dt> |
147 <dt><i>check</i></dt> |
148 <dd> |
148 <dd> |
149 reference to the checker function (function) |
149 reference to the checker function (function) |
150 </dd> |
150 </dd> |
165 <a NAME="__checkCodeStyle" ID="__checkCodeStyle"></a> |
165 <a NAME="__checkCodeStyle" ID="__checkCodeStyle"></a> |
166 <h2>__checkCodeStyle</h2> |
166 <h2>__checkCodeStyle</h2> |
167 <b>__checkCodeStyle</b>(<i>filename, source, args</i>) |
167 <b>__checkCodeStyle</b>(<i>filename, source, args</i>) |
168 |
168 |
169 <p> |
169 <p> |
170 Private module function to perform the code style check and/or fix |
170 Private module function to perform the source code style check and/or fix |
171 found errors. |
171 found errors. |
172 </p> |
172 </p> |
173 <dl> |
173 <dl> |
174 |
174 |
175 <dt><i>filename</i> (str)</dt> |
175 <dt><i>filename</i> (str)</dt> |
176 <dd> |
176 <dd> |
177 source filename |
177 source filename |
178 </dd> |
178 </dd> |
179 <dt><i>source</i> (str)</dt> |
179 <dt><i>source</i> (str)</dt> |
180 <dd> |
180 <dd> |
181 string containing the code to check |
181 string containing the source code to check |
182 </dd> |
182 </dd> |
183 <dt><i>args</i> (list of (str, str, bool, str, str, bool, int, list of (int, int),)</dt> |
183 <dt><i>args</i> (list of (str, str, bool, str, str, bool, int, list of (int, int),)</dt> |
184 <dd> |
184 <dd> |
185 arguments used by the codeStyleCheck function (list of |
185 arguments used by the codeStyleCheck function (list of |
186 excludeMessages, includeMessages, repeatMessages, fixCodes, |
186 excludeMessages, includeMessages, repeatMessages, fixCodes, |
198 keys: |
198 keys: |
199 <ul> |
199 <ul> |
200 <li>file: file name</li> |
200 <li>file: file name</li> |
201 <li>line: line_number</li> |
201 <li>line: line_number</li> |
202 <li>offset: offset within line</li> |
202 <li>offset: offset within line</li> |
203 <li>code: message code</li> |
203 <li>code: error message code</li> |
204 <li>args: list of arguments to format the message</li> |
204 <li>args: list of arguments to format the message</li> |
205 <li>ignored: flag indicating this issue was ignored</li> |
205 <li>ignored: flag indicating this issue was ignored</li> |
206 <li>fixed: flag indicating this issue was fixed</li> |
206 <li>fixed: flag indicating this issue was fixed</li> |
207 <li>autofixing: flag indicating that a fix can be done</li> |
207 <li>autofixing: flag indicating that a fix can be done</li> |
208 <li>fixcode: message code for the fix</li> |
208 <li>fixcode: message code for the fix</li> |
257 <a NAME="codeStyleBatchCheck" ID="codeStyleBatchCheck"></a> |
257 <a NAME="codeStyleBatchCheck" ID="codeStyleBatchCheck"></a> |
258 <h2>codeStyleBatchCheck</h2> |
258 <h2>codeStyleBatchCheck</h2> |
259 <b>codeStyleBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) |
259 <b>codeStyleBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) |
260 |
260 |
261 <p> |
261 <p> |
262 Module function to check code style for a batch of files. |
262 Module function to check source code style for a batch of files. |
263 </p> |
263 </p> |
264 <dl> |
264 <dl> |
265 |
265 |
266 <dt><i>argumentsList</i> (list)</dt> |
266 <dt><i>argumentsList</i> (list)</dt> |
267 <dd> |
267 <dd> |
290 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a> |
290 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a> |
291 <h2>codeStyleCheck</h2> |
291 <h2>codeStyleCheck</h2> |
292 <b>codeStyleCheck</b>(<i>filename, source, args</i>) |
292 <b>codeStyleCheck</b>(<i>filename, source, args</i>) |
293 |
293 |
294 <p> |
294 <p> |
295 Do the code style check and/or fix found errors. |
295 Do the source code style check and/or fix found errors. |
296 </p> |
296 </p> |
297 <dl> |
297 <dl> |
298 |
298 |
299 <dt><i>filename</i> (str)</dt> |
299 <dt><i>filename</i> (str)</dt> |
300 <dd> |
300 <dd> |
301 source filename |
301 source filename |
302 </dd> |
302 </dd> |
303 <dt><i>source</i> (str)</dt> |
303 <dt><i>source</i> (str)</dt> |
304 <dd> |
304 <dd> |
305 string containing the code to check |
305 string containing the source code to check |
306 </dd> |
306 </dd> |
307 <dt><i>args</i> (list of (str, str, bool, str, str, bool, int, list of (int, int),)</dt> |
307 <dt><i>args</i> (list of (str, str, bool, str, str, bool, int, list of (int, int),)</dt> |
308 <dd> |
308 <dd> |
309 arguments used by the codeStyleCheck function (list of |
309 arguments used by the codeStyleCheck function (list of |
310 excludeMessages, includeMessages, repeatMessages, fixCodes, |
310 excludeMessages, includeMessages, repeatMessages, fixCodes, |
369 <div align="right"><a href="#top">Up</a></div> |
369 <div align="right"><a href="#top">Up</a></div> |
370 <hr /> |
370 <hr /> |
371 <hr /> |
371 <hr /> |
372 <a NAME="ignoreCode" ID="ignoreCode"></a> |
372 <a NAME="ignoreCode" ID="ignoreCode"></a> |
373 <h2>ignoreCode</h2> |
373 <h2>ignoreCode</h2> |
374 <b>ignoreCode</b>(<i>code, lineFlags</i>) |
374 <b>ignoreCode</b>(<i>errorCode, lineFlags</i>) |
375 |
375 |
376 <p> |
376 <p> |
377 Function to check, if the given code should be ignored as per line flags. |
377 Function to check, if the given code should be ignored as per line flags. |
378 </p> |
378 </p> |
379 <dl> |
379 <dl> |
380 |
380 |
381 <dt><i>code</i> (str)</dt> |
381 <dt><i>errorCode</i> (str)</dt> |
382 <dd> |
382 <dd> |
383 error code to be checked |
383 error code to be checked |
384 </dd> |
384 </dd> |
385 <dt><i>lineFlags</i> (list of str)</dt> |
385 <dt><i>lineFlags</i> (list of str)</dt> |
386 <dd> |
386 <dd> |
434 <div align="right"><a href="#top">Up</a></div> |
434 <div align="right"><a href="#top">Up</a></div> |
435 <hr /> |
435 <hr /> |
436 <hr /> |
436 <hr /> |
437 <a NAME="securityOk" ID="securityOk"></a> |
437 <a NAME="securityOk" ID="securityOk"></a> |
438 <h2>securityOk</h2> |
438 <h2>securityOk</h2> |
439 <b>securityOk</b>(<i>code, lineFlags</i>) |
439 <b>securityOk</b>(<i>errorCode, lineFlags</i>) |
440 |
440 |
441 <p> |
|
442 Function to check, if the given code is an acknowledged security report. |
|
443 </p> |
|
444 <dl> |
|
445 |
|
446 <dt><i>code</i> (str)</dt> |
|
447 <dd> |
|
448 error code to be checked |
|
449 </dd> |
|
450 <dt><i>lineFlags</i> (list of str)</dt> |
|
451 <dd> |
|
452 list of line flags to check against |
|
453 </dd> |
|
454 </dl> |
|
455 <dl> |
|
456 <dt>Return:</dt> |
|
457 <dd> |
|
458 flag indicating an acknowledged security report |
|
459 </dd> |
|
460 </dl> |
|
461 <dl> |
|
462 <dt>Return Type:</dt> |
|
463 <dd> |
|
464 bool |
|
465 </dd> |
|
466 </dl> |
|
467 <div align="right"><a href="#top">Up</a></div> |
441 <div align="right"><a href="#top">Up</a></div> |
468 <hr /> |
442 <hr /> |
469 <hr /> |
443 <hr /> |
470 <a NAME="workerTask" ID="workerTask"></a> |
444 <a NAME="workerTask" ID="workerTask"></a> |
471 <h2>workerTask</h2> |
445 <h2>workerTask</h2> |