|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric5.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric5.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog to show the results of the code style check. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#CodeStyleCheckerDialog">CodeStyleCheckerDialog</a></td> |
|
34 <td>Class implementing a dialog to show the results of the code style check.</td> |
|
35 </tr><tr> |
|
36 <td><a href="#CodeStyleCheckerReport">CodeStyleCheckerReport</a></td> |
|
37 <td>Class implementing a special report to be used with our dialog.</td> |
|
38 </tr> |
|
39 </table> |
|
40 <h3>Functions</h3> |
|
41 <table> |
|
42 <tr><td>None</td></tr> |
|
43 </table> |
|
44 <hr /><hr /> |
|
45 <a NAME="CodeStyleCheckerDialog" ID="CodeStyleCheckerDialog"></a> |
|
46 <h2>CodeStyleCheckerDialog</h2> |
|
47 <p> |
|
48 Class implementing a dialog to show the results of the code style check. |
|
49 </p> |
|
50 <h3>Derived from</h3> |
|
51 QDialog, Ui_CodeStyleCheckerDialog |
|
52 <h3>Class Attributes</h3> |
|
53 <table> |
|
54 <tr><td>codeRole</td></tr><tr><td>filenameRole</td></tr><tr><td>fixableRole</td></tr><tr><td>lineRole</td></tr><tr><td>messageRole</td></tr><tr><td>positionRole</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#CodeStyleCheckerDialog.__init__">CodeStyleCheckerDialog</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#CodeStyleCheckerDialog.__clearErrors">__clearErrors</a></td> |
|
67 <td>Private method to clear all warning markers of open editors.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#CodeStyleCheckerDialog.__createResultItem">__createResultItem</a></td> |
|
70 <td>Private method to create an entry in the result list.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#CodeStyleCheckerDialog.__finish">__finish</a></td> |
|
73 <td>Private slot called when the code style check finished or the user pressed the cancel button.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#CodeStyleCheckerDialog.__getSelectedFixableItems">__getSelectedFixableItems</a></td> |
|
76 <td>Private method to extract all selected items for fixable issues.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#CodeStyleCheckerDialog.__itemFixable">__itemFixable</a></td> |
|
79 <td>Private method to check, if an item has a fixable issue.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#CodeStyleCheckerDialog.__modifyFixedResultItem">__modifyFixedResultItem</a></td> |
|
82 <td>Private method to modify a result list entry to show its positive fixed state.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#CodeStyleCheckerDialog.__resetStatistics">__resetStatistics</a></td> |
|
85 <td>Private slot to reset the statistics data.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#CodeStyleCheckerDialog.__resort">__resort</a></td> |
|
88 <td>Private method to resort the tree.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#CodeStyleCheckerDialog.__selectCodes">__selectCodes</a></td> |
|
91 <td>Private method to select message codes via a selection dialog.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#CodeStyleCheckerDialog.__updateFixerStatistics">__updateFixerStatistics</a></td> |
|
94 <td>Private method to update the collected fixer related statistics.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#CodeStyleCheckerDialog.__updateStatistics">__updateStatistics</a></td> |
|
97 <td>Private method to update the collected statistics.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#CodeStyleCheckerDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
100 <td>Private slot called by a button of the button box clicked.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked">on_excludeMessagesSelectButton_clicked</a></td> |
|
103 <td>Private slot to select the message codes to be excluded via a selection dialog.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#CodeStyleCheckerDialog.on_fixButton_clicked">on_fixButton_clicked</a></td> |
|
106 <td>Private slot to fix selected issues.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked">on_fixIssuesSelectButton_clicked</a></td> |
|
109 <td>Private slot to select the issue codes to be fixed via a selection dialog.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked">on_includeMessagesSelectButton_clicked</a></td> |
|
112 <td>Private slot to select the message codes to be included via a selection dialog.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#CodeStyleCheckerDialog.on_loadDefaultButton_clicked">on_loadDefaultButton_clicked</a></td> |
|
115 <td>Private slot to load the default configuration values.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked">on_noFixIssuesSelectButton_clicked</a></td> |
|
118 <td>Private slot to select the issue codes not to be fixed via a selection dialog.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#CodeStyleCheckerDialog.on_resetDefaultButton_clicked">on_resetDefaultButton_clicked</a></td> |
|
121 <td>Private slot to reset the configuration values to their default values.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#CodeStyleCheckerDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> |
|
124 <td>Private slot to handle the activation of an item.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#CodeStyleCheckerDialog.on_resultList_itemSelectionChanged">on_resultList_itemSelectionChanged</a></td> |
|
127 <td>Private slot to change the dialog state depending on the selection.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#CodeStyleCheckerDialog.on_showButton_clicked">on_showButton_clicked</a></td> |
|
130 <td>Private slot to handle the "Show" button press.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#CodeStyleCheckerDialog.on_startButton_clicked">on_startButton_clicked</a></td> |
|
133 <td>Private slot to start a code style check run.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#CodeStyleCheckerDialog.on_statisticsButton_clicked">on_statisticsButton_clicked</a></td> |
|
136 <td>Private slot to show the statistics dialog.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#CodeStyleCheckerDialog.on_storeDefaultButton_clicked">on_storeDefaultButton_clicked</a></td> |
|
139 <td>Private slot to store the current configuration values as default values.</td> |
|
140 </tr><tr> |
|
141 <td><a href="#CodeStyleCheckerDialog.prepare">prepare</a></td> |
|
142 <td>Public method to prepare the dialog with a list of filenames.</td> |
|
143 </tr><tr> |
|
144 <td><a href="#CodeStyleCheckerDialog.start">start</a></td> |
|
145 <td>Public slot to start the code style check.</td> |
|
146 </tr> |
|
147 </table> |
|
148 <h3>Static Methods</h3> |
|
149 <table> |
|
150 <tr><td>None</td></tr> |
|
151 </table> |
|
152 <a NAME="CodeStyleCheckerDialog.__init__" ID="CodeStyleCheckerDialog.__init__"></a> |
|
153 <h4>CodeStyleCheckerDialog (Constructor)</h4> |
|
154 <b>CodeStyleCheckerDialog</b>(<i>parent=None</i>) |
|
155 <p> |
|
156 Constructor |
|
157 </p><dl> |
|
158 <dt><i>parent</i></dt> |
|
159 <dd> |
|
160 reference to the parent widget (QWidget) |
|
161 </dd> |
|
162 </dl><a NAME="CodeStyleCheckerDialog.__clearErrors" ID="CodeStyleCheckerDialog.__clearErrors"></a> |
|
163 <h4>CodeStyleCheckerDialog.__clearErrors</h4> |
|
164 <b>__clearErrors</b>(<i></i>) |
|
165 <p> |
|
166 Private method to clear all warning markers of open editors. |
|
167 </p><a NAME="CodeStyleCheckerDialog.__createResultItem" ID="CodeStyleCheckerDialog.__createResultItem"></a> |
|
168 <h4>CodeStyleCheckerDialog.__createResultItem</h4> |
|
169 <b>__createResultItem</b>(<i>file, line, pos, message, fixed, autofixing</i>) |
|
170 <p> |
|
171 Private method to create an entry in the result list. |
|
172 </p><dl> |
|
173 <dt><i>file</i></dt> |
|
174 <dd> |
|
175 file name of the file (string) |
|
176 </dd><dt><i>line</i></dt> |
|
177 <dd> |
|
178 line number of issue (integer or string) |
|
179 </dd><dt><i>pos</i></dt> |
|
180 <dd> |
|
181 character position of issue (integer or string) |
|
182 </dd><dt><i>message</i></dt> |
|
183 <dd> |
|
184 message text (string) |
|
185 </dd><dt><i>fixed</i></dt> |
|
186 <dd> |
|
187 flag indicating a fixed issue (boolean) |
|
188 </dd><dt><i>autofixing</i></dt> |
|
189 <dd> |
|
190 flag indicating, that we are fixing issues |
|
191 automatically (boolean) |
|
192 </dd> |
|
193 </dl><dl> |
|
194 <dt>Returns:</dt> |
|
195 <dd> |
|
196 reference to the created item (QTreeWidgetItem) |
|
197 </dd> |
|
198 </dl><a NAME="CodeStyleCheckerDialog.__finish" ID="CodeStyleCheckerDialog.__finish"></a> |
|
199 <h4>CodeStyleCheckerDialog.__finish</h4> |
|
200 <b>__finish</b>(<i></i>) |
|
201 <p> |
|
202 Private slot called when the code style check finished or the user |
|
203 pressed the cancel button. |
|
204 </p><a NAME="CodeStyleCheckerDialog.__getSelectedFixableItems" ID="CodeStyleCheckerDialog.__getSelectedFixableItems"></a> |
|
205 <h4>CodeStyleCheckerDialog.__getSelectedFixableItems</h4> |
|
206 <b>__getSelectedFixableItems</b>(<i></i>) |
|
207 <p> |
|
208 Private method to extract all selected items for fixable issues. |
|
209 </p><dl> |
|
210 <dt>Returns:</dt> |
|
211 <dd> |
|
212 selected items for fixable issues (list of QTreeWidgetItem) |
|
213 </dd> |
|
214 </dl><a NAME="CodeStyleCheckerDialog.__itemFixable" ID="CodeStyleCheckerDialog.__itemFixable"></a> |
|
215 <h4>CodeStyleCheckerDialog.__itemFixable</h4> |
|
216 <b>__itemFixable</b>(<i>itm</i>) |
|
217 <p> |
|
218 Private method to check, if an item has a fixable issue. |
|
219 </p><dl> |
|
220 <dt><i>itm</i></dt> |
|
221 <dd> |
|
222 item to be checked (QTreeWidgetItem) |
|
223 </dd> |
|
224 </dl><dl> |
|
225 <dt>Returns:</dt> |
|
226 <dd> |
|
227 flag indicating a fixable issue (boolean) |
|
228 </dd> |
|
229 </dl><a NAME="CodeStyleCheckerDialog.__modifyFixedResultItem" ID="CodeStyleCheckerDialog.__modifyFixedResultItem"></a> |
|
230 <h4>CodeStyleCheckerDialog.__modifyFixedResultItem</h4> |
|
231 <b>__modifyFixedResultItem</b>(<i>itm, text, fixed</i>) |
|
232 <p> |
|
233 Private method to modify a result list entry to show its |
|
234 positive fixed state. |
|
235 </p><dl> |
|
236 <dt><i>itm</i></dt> |
|
237 <dd> |
|
238 reference to the item to modify (QTreeWidgetItem) |
|
239 </dd><dt><i>text</i></dt> |
|
240 <dd> |
|
241 text to be appended (string) |
|
242 </dd><dt><i>fixed</i></dt> |
|
243 <dd> |
|
244 flag indicating a fixed issue (boolean) |
|
245 </dd> |
|
246 </dl><a NAME="CodeStyleCheckerDialog.__resetStatistics" ID="CodeStyleCheckerDialog.__resetStatistics"></a> |
|
247 <h4>CodeStyleCheckerDialog.__resetStatistics</h4> |
|
248 <b>__resetStatistics</b>(<i></i>) |
|
249 <p> |
|
250 Private slot to reset the statistics data. |
|
251 </p><a NAME="CodeStyleCheckerDialog.__resort" ID="CodeStyleCheckerDialog.__resort"></a> |
|
252 <h4>CodeStyleCheckerDialog.__resort</h4> |
|
253 <b>__resort</b>(<i></i>) |
|
254 <p> |
|
255 Private method to resort the tree. |
|
256 </p><a NAME="CodeStyleCheckerDialog.__selectCodes" ID="CodeStyleCheckerDialog.__selectCodes"></a> |
|
257 <h4>CodeStyleCheckerDialog.__selectCodes</h4> |
|
258 <b>__selectCodes</b>(<i>edit, showFixCodes</i>) |
|
259 <p> |
|
260 Private method to select message codes via a selection dialog. |
|
261 </p><dl> |
|
262 <dt><i>edit</i></dt> |
|
263 <dd> |
|
264 reference of the line edit to be populated (QLineEdit) |
|
265 </dd><dt><i>showFixCodes</i></dt> |
|
266 <dd> |
|
267 flag indicating to show a list of fixable |
|
268 issues (boolean) |
|
269 </dd> |
|
270 </dl><a NAME="CodeStyleCheckerDialog.__updateFixerStatistics" ID="CodeStyleCheckerDialog.__updateFixerStatistics"></a> |
|
271 <h4>CodeStyleCheckerDialog.__updateFixerStatistics</h4> |
|
272 <b>__updateFixerStatistics</b>(<i>fixer</i>) |
|
273 <p> |
|
274 Private method to update the collected fixer related statistics. |
|
275 </p><dl> |
|
276 <dt><i>fixer</i></dt> |
|
277 <dd> |
|
278 reference to the code style fixer (CodeStyleFixer) |
|
279 </dd> |
|
280 </dl><a NAME="CodeStyleCheckerDialog.__updateStatistics" ID="CodeStyleCheckerDialog.__updateStatistics"></a> |
|
281 <h4>CodeStyleCheckerDialog.__updateStatistics</h4> |
|
282 <b>__updateStatistics</b>(<i>statistics, fixer</i>) |
|
283 <p> |
|
284 Private method to update the collected statistics. |
|
285 </p><dl> |
|
286 <dt><i>statistics</i></dt> |
|
287 <dd> |
|
288 dictionary of statistical data with |
|
289 message code as key and message count as value |
|
290 </dd><dt><i>fixer</i></dt> |
|
291 <dd> |
|
292 reference to the code style fixer (CodeStyleFixer) |
|
293 </dd> |
|
294 </dl><a NAME="CodeStyleCheckerDialog.on_buttonBox_clicked" ID="CodeStyleCheckerDialog.on_buttonBox_clicked"></a> |
|
295 <h4>CodeStyleCheckerDialog.on_buttonBox_clicked</h4> |
|
296 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
297 <p> |
|
298 Private slot called by a button of the button box clicked. |
|
299 </p><dl> |
|
300 <dt><i>button</i></dt> |
|
301 <dd> |
|
302 button that was clicked (QAbstractButton) |
|
303 </dd> |
|
304 </dl><a NAME="CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked"></a> |
|
305 <h4>CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked</h4> |
|
306 <b>on_excludeMessagesSelectButton_clicked</b>(<i></i>) |
|
307 <p> |
|
308 Private slot to select the message codes to be excluded via a |
|
309 selection dialog. |
|
310 </p><a NAME="CodeStyleCheckerDialog.on_fixButton_clicked" ID="CodeStyleCheckerDialog.on_fixButton_clicked"></a> |
|
311 <h4>CodeStyleCheckerDialog.on_fixButton_clicked</h4> |
|
312 <b>on_fixButton_clicked</b>(<i></i>) |
|
313 <p> |
|
314 Private slot to fix selected issues. |
|
315 </p><a NAME="CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked"></a> |
|
316 <h4>CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked</h4> |
|
317 <b>on_fixIssuesSelectButton_clicked</b>(<i></i>) |
|
318 <p> |
|
319 Private slot to select the issue codes to be fixed via a |
|
320 selection dialog. |
|
321 </p><a NAME="CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked"></a> |
|
322 <h4>CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked</h4> |
|
323 <b>on_includeMessagesSelectButton_clicked</b>(<i></i>) |
|
324 <p> |
|
325 Private slot to select the message codes to be included via a |
|
326 selection dialog. |
|
327 </p><a NAME="CodeStyleCheckerDialog.on_loadDefaultButton_clicked" ID="CodeStyleCheckerDialog.on_loadDefaultButton_clicked"></a> |
|
328 <h4>CodeStyleCheckerDialog.on_loadDefaultButton_clicked</h4> |
|
329 <b>on_loadDefaultButton_clicked</b>(<i></i>) |
|
330 <p> |
|
331 Private slot to load the default configuration values. |
|
332 </p><a NAME="CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked"></a> |
|
333 <h4>CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked</h4> |
|
334 <b>on_noFixIssuesSelectButton_clicked</b>(<i></i>) |
|
335 <p> |
|
336 Private slot to select the issue codes not to be fixed via a |
|
337 selection dialog. |
|
338 </p><a NAME="CodeStyleCheckerDialog.on_resetDefaultButton_clicked" ID="CodeStyleCheckerDialog.on_resetDefaultButton_clicked"></a> |
|
339 <h4>CodeStyleCheckerDialog.on_resetDefaultButton_clicked</h4> |
|
340 <b>on_resetDefaultButton_clicked</b>(<i></i>) |
|
341 <p> |
|
342 Private slot to reset the configuration values to their default values. |
|
343 </p><a NAME="CodeStyleCheckerDialog.on_resultList_itemActivated" ID="CodeStyleCheckerDialog.on_resultList_itemActivated"></a> |
|
344 <h4>CodeStyleCheckerDialog.on_resultList_itemActivated</h4> |
|
345 <b>on_resultList_itemActivated</b>(<i>item, column</i>) |
|
346 <p> |
|
347 Private slot to handle the activation of an item. |
|
348 </p><dl> |
|
349 <dt><i>item</i></dt> |
|
350 <dd> |
|
351 reference to the activated item (QTreeWidgetItem) |
|
352 </dd><dt><i>column</i></dt> |
|
353 <dd> |
|
354 column the item was activated in (integer) |
|
355 </dd> |
|
356 </dl><a NAME="CodeStyleCheckerDialog.on_resultList_itemSelectionChanged" ID="CodeStyleCheckerDialog.on_resultList_itemSelectionChanged"></a> |
|
357 <h4>CodeStyleCheckerDialog.on_resultList_itemSelectionChanged</h4> |
|
358 <b>on_resultList_itemSelectionChanged</b>(<i></i>) |
|
359 <p> |
|
360 Private slot to change the dialog state depending on the selection. |
|
361 </p><a NAME="CodeStyleCheckerDialog.on_showButton_clicked" ID="CodeStyleCheckerDialog.on_showButton_clicked"></a> |
|
362 <h4>CodeStyleCheckerDialog.on_showButton_clicked</h4> |
|
363 <b>on_showButton_clicked</b>(<i></i>) |
|
364 <p> |
|
365 Private slot to handle the "Show" button press. |
|
366 </p><a NAME="CodeStyleCheckerDialog.on_startButton_clicked" ID="CodeStyleCheckerDialog.on_startButton_clicked"></a> |
|
367 <h4>CodeStyleCheckerDialog.on_startButton_clicked</h4> |
|
368 <b>on_startButton_clicked</b>(<i></i>) |
|
369 <p> |
|
370 Private slot to start a code style check run. |
|
371 </p><a NAME="CodeStyleCheckerDialog.on_statisticsButton_clicked" ID="CodeStyleCheckerDialog.on_statisticsButton_clicked"></a> |
|
372 <h4>CodeStyleCheckerDialog.on_statisticsButton_clicked</h4> |
|
373 <b>on_statisticsButton_clicked</b>(<i></i>) |
|
374 <p> |
|
375 Private slot to show the statistics dialog. |
|
376 </p><a NAME="CodeStyleCheckerDialog.on_storeDefaultButton_clicked" ID="CodeStyleCheckerDialog.on_storeDefaultButton_clicked"></a> |
|
377 <h4>CodeStyleCheckerDialog.on_storeDefaultButton_clicked</h4> |
|
378 <b>on_storeDefaultButton_clicked</b>(<i></i>) |
|
379 <p> |
|
380 Private slot to store the current configuration values as |
|
381 default values. |
|
382 </p><a NAME="CodeStyleCheckerDialog.prepare" ID="CodeStyleCheckerDialog.prepare"></a> |
|
383 <h4>CodeStyleCheckerDialog.prepare</h4> |
|
384 <b>prepare</b>(<i>fileList, project</i>) |
|
385 <p> |
|
386 Public method to prepare the dialog with a list of filenames. |
|
387 </p><dl> |
|
388 <dt><i>fileList</i></dt> |
|
389 <dd> |
|
390 list of filenames (list of strings) |
|
391 </dd><dt><i>project</i></dt> |
|
392 <dd> |
|
393 reference to the project object (Project) |
|
394 </dd> |
|
395 </dl><a NAME="CodeStyleCheckerDialog.start" ID="CodeStyleCheckerDialog.start"></a> |
|
396 <h4>CodeStyleCheckerDialog.start</h4> |
|
397 <b>start</b>(<i>fn, save=False, repeat=None</i>) |
|
398 <p> |
|
399 Public slot to start the code style check. |
|
400 </p><dl> |
|
401 <dt><i>fn</i></dt> |
|
402 <dd> |
|
403 file or list of files or directory to be checked |
|
404 (string or list of strings) |
|
405 </dd><dt><i>save=</i></dt> |
|
406 <dd> |
|
407 flag indicating to save the given |
|
408 file/file list/directory (boolean) |
|
409 </dd><dt><i>repeat=</i></dt> |
|
410 <dd> |
|
411 state of the repeat check box if it is not None |
|
412 (None or boolean) |
|
413 </dd> |
|
414 </dl> |
|
415 <div align="right"><a href="#top">Up</a></div> |
|
416 <hr /><hr /> |
|
417 <a NAME="CodeStyleCheckerReport" ID="CodeStyleCheckerReport"></a> |
|
418 <h2>CodeStyleCheckerReport</h2> |
|
419 <p> |
|
420 Class implementing a special report to be used with our dialog. |
|
421 </p> |
|
422 <h3>Derived from</h3> |
|
423 pep8.BaseReport |
|
424 <h3>Class Attributes</h3> |
|
425 <table> |
|
426 <tr><td>None</td></tr> |
|
427 </table> |
|
428 <h3>Class Methods</h3> |
|
429 <table> |
|
430 <tr><td>None</td></tr> |
|
431 </table> |
|
432 <h3>Methods</h3> |
|
433 <table> |
|
434 <tr> |
|
435 <td><a href="#CodeStyleCheckerReport.__init__">CodeStyleCheckerReport</a></td> |
|
436 <td>Constructor</td> |
|
437 </tr><tr> |
|
438 <td><a href="#CodeStyleCheckerReport.error_args">error_args</a></td> |
|
439 <td>Public method to collect the error messages.</td> |
|
440 </tr> |
|
441 </table> |
|
442 <h3>Static Methods</h3> |
|
443 <table> |
|
444 <tr><td>None</td></tr> |
|
445 </table> |
|
446 <a NAME="CodeStyleCheckerReport.__init__" ID="CodeStyleCheckerReport.__init__"></a> |
|
447 <h4>CodeStyleCheckerReport (Constructor)</h4> |
|
448 <b>CodeStyleCheckerReport</b>(<i>options</i>) |
|
449 <p> |
|
450 Constructor |
|
451 </p><dl> |
|
452 <dt><i>options</i></dt> |
|
453 <dd> |
|
454 options for the report (optparse.Values) |
|
455 </dd> |
|
456 </dl><a NAME="CodeStyleCheckerReport.error_args" ID="CodeStyleCheckerReport.error_args"></a> |
|
457 <h4>CodeStyleCheckerReport.error_args</h4> |
|
458 <b>error_args</b>(<i>line_number, offset, code, check, *args</i>) |
|
459 <p> |
|
460 Public method to collect the error messages. |
|
461 </p><dl> |
|
462 <dt><i>line_number</i></dt> |
|
463 <dd> |
|
464 line number of the issue (integer) |
|
465 </dd><dt><i>offset</i></dt> |
|
466 <dd> |
|
467 position within line of the issue (integer) |
|
468 </dd><dt><i>code</i></dt> |
|
469 <dd> |
|
470 message code (string) |
|
471 </dd><dt><i>check</i></dt> |
|
472 <dd> |
|
473 reference to the checker function (function) |
|
474 </dd><dt><i>args</i></dt> |
|
475 <dd> |
|
476 arguments for the message (list) |
|
477 </dd> |
|
478 </dl><dl> |
|
479 <dt>Returns:</dt> |
|
480 <dd> |
|
481 error code (string) |
|
482 </dd> |
|
483 </dl> |
|
484 <div align="right"><a href="#top">Up</a></div> |
|
485 <hr /> |
|
486 </body></html> |