eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog.html

changeset 6942
2602857055c5
parent 5623
f4d7cfdadc3f
child 7273
391d6b7b1eff
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.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>eric6.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>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="CodeStyleCheckerDialog" ID="CodeStyleCheckerDialog"></a>
43 <h2>CodeStyleCheckerDialog</h2>
44 <p>
45 Class implementing a dialog to show the results of the code style check.
46 </p>
47 <h3>Derived from</h3>
48 QDialog, Ui_CodeStyleCheckerDialog
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>availableFutures</td></tr><tr><td>codeRole</td></tr><tr><td>filenameRole</td></tr><tr><td>fixableRole</td></tr><tr><td>hasResults</td></tr><tr><td>ignoredRole</td></tr><tr><td>lineRole</td></tr><tr><td>messageRole</td></tr><tr><td>noFiles</td></tr><tr><td>noResults</td></tr><tr><td>positionRole</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Methods</h3>
58 <table>
59 <tr>
60 <td><a href="#CodeStyleCheckerDialog.__init__">CodeStyleCheckerDialog</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#CodeStyleCheckerDialog.__batchFinished">__batchFinished</a></td>
64 <td>Private slot handling the completion of a batch job.</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 to be checked.</td>
68 </tr><tr>
69 <td><a href="#CodeStyleCheckerDialog.__createErrorItem">__createErrorItem</a></td>
70 <td>Private slot to create a new error item in the result list.</td>
71 </tr><tr>
72 <td><a href="#CodeStyleCheckerDialog.__createResultItem">__createResultItem</a></td>
73 <td>Private method to create an entry in the result list.</td>
74 </tr><tr>
75 <td><a href="#CodeStyleCheckerDialog.__finish">__finish</a></td>
76 <td>Private slot called when the code style check finished or the user pressed the cancel button.</td>
77 </tr><tr>
78 <td><a href="#CodeStyleCheckerDialog.__getBuiltinsIgnoreList">__getBuiltinsIgnoreList</a></td>
79 <td>Private method to get a dictionary containing the builtins assignments to be ignored.</td>
80 </tr><tr>
81 <td><a href="#CodeStyleCheckerDialog.__getEol">__getEol</a></td>
82 <td>Private method to get the applicable eol string.</td>
83 </tr><tr>
84 <td><a href="#CodeStyleCheckerDialog.__getSelectedFixableItems">__getSelectedFixableItems</a></td>
85 <td>Private method to extract all selected items for fixable issues.</td>
86 </tr><tr>
87 <td><a href="#CodeStyleCheckerDialog.__getSelectedFutureImports">__getSelectedFutureImports</a></td>
88 <td>Private method to get the expected future imports.</td>
89 </tr><tr>
90 <td><a href="#CodeStyleCheckerDialog.__initBuiltinsIgnoreList">__initBuiltinsIgnoreList</a></td>
91 <td>Private method to populate the list of shadowed builtins to be ignored.</td>
92 </tr><tr>
93 <td><a href="#CodeStyleCheckerDialog.__initFuturesList">__initFuturesList</a></td>
94 <td>Private method to set the selected status of the future imports.</td>
95 </tr><tr>
96 <td><a href="#CodeStyleCheckerDialog.__itemFixable">__itemFixable</a></td>
97 <td>Private method to check, if an item has a fixable issue.</td>
98 </tr><tr>
99 <td><a href="#CodeStyleCheckerDialog.__modifyFixedResultItem">__modifyFixedResultItem</a></td>
100 <td>Private method to modify a result list entry to show its positive fixed state.</td>
101 </tr><tr>
102 <td><a href="#CodeStyleCheckerDialog.__modifyOptions">__modifyOptions</a></td>
103 <td>Private method to modify the options based on eflag: entries.</td>
104 </tr><tr>
105 <td><a href="#CodeStyleCheckerDialog.__processError">__processError</a></td>
106 <td>Private slot to process an error indication from the service.</td>
107 </tr><tr>
108 <td><a href="#CodeStyleCheckerDialog.__processResult">__processResult</a></td>
109 <td>Private slot called after perfoming a style check on one file.</td>
110 </tr><tr>
111 <td><a href="#CodeStyleCheckerDialog.__resetStatistics">__resetStatistics</a></td>
112 <td>Private slot to reset the statistics data.</td>
113 </tr><tr>
114 <td><a href="#CodeStyleCheckerDialog.__resort">__resort</a></td>
115 <td>Private method to resort the tree.</td>
116 </tr><tr>
117 <td><a href="#CodeStyleCheckerDialog.__selectCodes">__selectCodes</a></td>
118 <td>Private method to select message codes via a selection dialog.</td>
119 </tr><tr>
120 <td><a href="#CodeStyleCheckerDialog.__updateFixerStatistics">__updateFixerStatistics</a></td>
121 <td>Private method to update the collected fixer related statistics.</td>
122 </tr><tr>
123 <td><a href="#CodeStyleCheckerDialog.__updateStatistics">__updateStatistics</a></td>
124 <td>Private method to update the collected statistics.</td>
125 </tr><tr>
126 <td><a href="#CodeStyleCheckerDialog.check">check</a></td>
127 <td>Public method to start a style check for one file.</td>
128 </tr><tr>
129 <td><a href="#CodeStyleCheckerDialog.checkBatch">checkBatch</a></td>
130 <td>Public method to start a style check batch job.</td>
131 </tr><tr>
132 <td><a href="#CodeStyleCheckerDialog.on_addBuiltinButton_clicked">on_addBuiltinButton_clicked</a></td>
133 <td>Private slot to add a built-in assignment to be ignored.</td>
134 </tr><tr>
135 <td><a href="#CodeStyleCheckerDialog.on_builtinsAssignmentList_itemSelectionChanged">on_builtinsAssignmentList_itemSelectionChanged</a></td>
136 <td>Private slot to react upon changes of the selected builtin assignments.</td>
137 </tr><tr>
138 <td><a href="#CodeStyleCheckerDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
139 <td>Private slot called by a button of the button box clicked.</td>
140 </tr><tr>
141 <td><a href="#CodeStyleCheckerDialog.on_deleteBuiltinButton_clicked">on_deleteBuiltinButton_clicked</a></td>
142 <td>Private slot to delete the selected items from the list.</td>
143 </tr><tr>
144 <td><a href="#CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked">on_excludeMessagesSelectButton_clicked</a></td>
145 <td>Private slot to select the message codes to be excluded via a selection dialog.</td>
146 </tr><tr>
147 <td><a href="#CodeStyleCheckerDialog.on_fixButton_clicked">on_fixButton_clicked</a></td>
148 <td>Private slot to fix selected issues.</td>
149 </tr><tr>
150 <td><a href="#CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked">on_fixIssuesSelectButton_clicked</a></td>
151 <td>Private slot to select the issue codes to be fixed via a selection dialog.</td>
152 </tr><tr>
153 <td><a href="#CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked">on_includeMessagesSelectButton_clicked</a></td>
154 <td>Private slot to select the message codes to be included via a selection dialog.</td>
155 </tr><tr>
156 <td><a href="#CodeStyleCheckerDialog.on_loadDefaultButton_clicked">on_loadDefaultButton_clicked</a></td>
157 <td>Private slot to load the default configuration values.</td>
158 </tr><tr>
159 <td><a href="#CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked">on_noFixIssuesSelectButton_clicked</a></td>
160 <td>Private slot to select the issue codes not to be fixed via a selection dialog.</td>
161 </tr><tr>
162 <td><a href="#CodeStyleCheckerDialog.on_resetDefaultButton_clicked">on_resetDefaultButton_clicked</a></td>
163 <td>Private slot to reset the configuration values to their default values.</td>
164 </tr><tr>
165 <td><a href="#CodeStyleCheckerDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td>
166 <td>Private slot to handle the activation of an item.</td>
167 </tr><tr>
168 <td><a href="#CodeStyleCheckerDialog.on_resultList_itemSelectionChanged">on_resultList_itemSelectionChanged</a></td>
169 <td>Private slot to change the dialog state depending on the selection.</td>
170 </tr><tr>
171 <td><a href="#CodeStyleCheckerDialog.on_showButton_clicked">on_showButton_clicked</a></td>
172 <td>Private slot to handle the "Show" button press.</td>
173 </tr><tr>
174 <td><a href="#CodeStyleCheckerDialog.on_startButton_clicked">on_startButton_clicked</a></td>
175 <td>Private slot to start a code style check run.</td>
176 </tr><tr>
177 <td><a href="#CodeStyleCheckerDialog.on_statisticsButton_clicked">on_statisticsButton_clicked</a></td>
178 <td>Private slot to show the statistics dialog.</td>
179 </tr><tr>
180 <td><a href="#CodeStyleCheckerDialog.on_storeDefaultButton_clicked">on_storeDefaultButton_clicked</a></td>
181 <td>Private slot to store the current configuration values as default values.</td>
182 </tr><tr>
183 <td><a href="#CodeStyleCheckerDialog.prepare">prepare</a></td>
184 <td>Public method to prepare the dialog with a list of filenames.</td>
185 </tr><tr>
186 <td><a href="#CodeStyleCheckerDialog.start">start</a></td>
187 <td>Public slot to start the code style check.</td>
188 </tr>
189 </table>
190 <h3>Static Methods</h3>
191 <table>
192 <tr><td>None</td></tr>
193 </table>
194 <a NAME="CodeStyleCheckerDialog.__init__" ID="CodeStyleCheckerDialog.__init__"></a>
195 <h4>CodeStyleCheckerDialog (Constructor)</h4>
196 <b>CodeStyleCheckerDialog</b>(<i>styleCheckService, parent=None</i>)
197 <p>
198 Constructor
199 </p><dl>
200 <dt><i>styleCheckService</i></dt>
201 <dd>
202 reference to the service
203 (CodeStyleCheckService)
204 </dd><dt><i>parent</i></dt>
205 <dd>
206 reference to the parent widget (QWidget)
207 </dd>
208 </dl><a NAME="CodeStyleCheckerDialog.__batchFinished" ID="CodeStyleCheckerDialog.__batchFinished"></a>
209 <h4>CodeStyleCheckerDialog.__batchFinished</h4>
210 <b>__batchFinished</b>(<i></i>)
211 <p>
212 Private slot handling the completion of a batch job.
213 </p><a NAME="CodeStyleCheckerDialog.__clearErrors" ID="CodeStyleCheckerDialog.__clearErrors"></a>
214 <h4>CodeStyleCheckerDialog.__clearErrors</h4>
215 <b>__clearErrors</b>(<i>files</i>)
216 <p>
217 Private method to clear all warning markers of open editors to be
218 checked.
219 </p><dl>
220 <dt><i>files</i></dt>
221 <dd>
222 list of files to be checked (list of string)
223 </dd>
224 </dl><a NAME="CodeStyleCheckerDialog.__createErrorItem" ID="CodeStyleCheckerDialog.__createErrorItem"></a>
225 <h4>CodeStyleCheckerDialog.__createErrorItem</h4>
226 <b>__createErrorItem</b>(<i>filename, message</i>)
227 <p>
228 Private slot to create a new error item in the result list.
229 </p><dl>
230 <dt><i>filename</i> (str)</dt>
231 <dd>
232 name of the file
233 </dd><dt><i>message</i> (str)</dt>
234 <dd>
235 error message
236 </dd>
237 </dl><a NAME="CodeStyleCheckerDialog.__createResultItem" ID="CodeStyleCheckerDialog.__createResultItem"></a>
238 <h4>CodeStyleCheckerDialog.__createResultItem</h4>
239 <b>__createResultItem</b>(<i>filename, line, pos, message, fixed, autofixing, ignored</i>)
240 <p>
241 Private method to create an entry in the result list.
242 </p><dl>
243 <dt><i>filename</i></dt>
244 <dd>
245 file name of the file (string)
246 </dd><dt><i>line</i></dt>
247 <dd>
248 line number of issue (integer or string)
249 </dd><dt><i>pos</i></dt>
250 <dd>
251 character position of issue (integer or string)
252 </dd><dt><i>message</i></dt>
253 <dd>
254 message text (string)
255 </dd><dt><i>fixed</i></dt>
256 <dd>
257 flag indicating a fixed issue (boolean)
258 </dd><dt><i>autofixing</i></dt>
259 <dd>
260 flag indicating, that we are fixing issues
261 automatically (boolean)
262 </dd><dt><i>ignored</i></dt>
263 <dd>
264 flag indicating an ignored issue (boolean)
265 </dd>
266 </dl><dl>
267 <dt>Returns:</dt>
268 <dd>
269 reference to the created item (QTreeWidgetItem)
270 </dd>
271 </dl><a NAME="CodeStyleCheckerDialog.__finish" ID="CodeStyleCheckerDialog.__finish"></a>
272 <h4>CodeStyleCheckerDialog.__finish</h4>
273 <b>__finish</b>(<i></i>)
274 <p>
275 Private slot called when the code style check finished or the user
276 pressed the cancel button.
277 </p><a NAME="CodeStyleCheckerDialog.__getBuiltinsIgnoreList" ID="CodeStyleCheckerDialog.__getBuiltinsIgnoreList"></a>
278 <h4>CodeStyleCheckerDialog.__getBuiltinsIgnoreList</h4>
279 <b>__getBuiltinsIgnoreList</b>(<i></i>)
280 <p>
281 Private method to get a dictionary containing the builtins assignments
282 to be ignored.
283 </p><dl>
284 <dt>Returns:</dt>
285 <dd>
286 dictionary containing the builtins assignments to be ignored
287 </dd>
288 </dl><dl>
289 <dt>Return Type:</dt>
290 <dd>
291 dict of list of str
292 </dd>
293 </dl><a NAME="CodeStyleCheckerDialog.__getEol" ID="CodeStyleCheckerDialog.__getEol"></a>
294 <h4>CodeStyleCheckerDialog.__getEol</h4>
295 <b>__getEol</b>(<i>fn</i>)
296 <p>
297 Private method to get the applicable eol string.
298 </p><dl>
299 <dt><i>fn</i></dt>
300 <dd>
301 filename where to determine the line ending (str)
302 </dd>
303 </dl><dl>
304 <dt>Returns:</dt>
305 <dd>
306 eol string (string)
307 </dd>
308 </dl><a NAME="CodeStyleCheckerDialog.__getSelectedFixableItems" ID="CodeStyleCheckerDialog.__getSelectedFixableItems"></a>
309 <h4>CodeStyleCheckerDialog.__getSelectedFixableItems</h4>
310 <b>__getSelectedFixableItems</b>(<i></i>)
311 <p>
312 Private method to extract all selected items for fixable issues.
313 </p><dl>
314 <dt>Returns:</dt>
315 <dd>
316 selected items for fixable issues (list of QTreeWidgetItem)
317 </dd>
318 </dl><a NAME="CodeStyleCheckerDialog.__getSelectedFutureImports" ID="CodeStyleCheckerDialog.__getSelectedFutureImports"></a>
319 <h4>CodeStyleCheckerDialog.__getSelectedFutureImports</h4>
320 <b>__getSelectedFutureImports</b>(<i></i>)
321 <p>
322 Private method to get the expected future imports.
323 </p><dl>
324 <dt>Returns:</dt>
325 <dd>
326 expected future imports as a comma separated string
327 </dd>
328 </dl><dl>
329 <dt>Return Type:</dt>
330 <dd>
331 str
332 </dd>
333 </dl><a NAME="CodeStyleCheckerDialog.__initBuiltinsIgnoreList" ID="CodeStyleCheckerDialog.__initBuiltinsIgnoreList"></a>
334 <h4>CodeStyleCheckerDialog.__initBuiltinsIgnoreList</h4>
335 <b>__initBuiltinsIgnoreList</b>(<i>builtinsIgnoreDict</i>)
336 <p>
337 Private method to populate the list of shadowed builtins to be ignored.
338 </p><dl>
339 <dt><i>builtinsIgnoreDict</i> (dict of list of str)</dt>
340 <dd>
341 dictionary containing the builtins
342 assignments to be ignored
343 </dd>
344 </dl><a NAME="CodeStyleCheckerDialog.__initFuturesList" ID="CodeStyleCheckerDialog.__initFuturesList"></a>
345 <h4>CodeStyleCheckerDialog.__initFuturesList</h4>
346 <b>__initFuturesList</b>(<i>selectedFutures</i>)
347 <p>
348 Private method to set the selected status of the future imports.
349 </p><dl>
350 <dt><i>selectedFutures</i> (str)</dt>
351 <dd>
352 comma separated list of expected future imports
353 </dd>
354 </dl><a NAME="CodeStyleCheckerDialog.__itemFixable" ID="CodeStyleCheckerDialog.__itemFixable"></a>
355 <h4>CodeStyleCheckerDialog.__itemFixable</h4>
356 <b>__itemFixable</b>(<i>itm</i>)
357 <p>
358 Private method to check, if an item has a fixable issue.
359 </p><dl>
360 <dt><i>itm</i></dt>
361 <dd>
362 item to be checked (QTreeWidgetItem)
363 </dd>
364 </dl><dl>
365 <dt>Returns:</dt>
366 <dd>
367 flag indicating a fixable issue (boolean)
368 </dd>
369 </dl><a NAME="CodeStyleCheckerDialog.__modifyFixedResultItem" ID="CodeStyleCheckerDialog.__modifyFixedResultItem"></a>
370 <h4>CodeStyleCheckerDialog.__modifyFixedResultItem</h4>
371 <b>__modifyFixedResultItem</b>(<i>itm, text, fixed</i>)
372 <p>
373 Private method to modify a result list entry to show its
374 positive fixed state.
375 </p><dl>
376 <dt><i>itm</i></dt>
377 <dd>
378 reference to the item to modify (QTreeWidgetItem)
379 </dd><dt><i>text</i></dt>
380 <dd>
381 text to be appended (string)
382 </dd><dt><i>fixed</i></dt>
383 <dd>
384 flag indicating a fixed issue (boolean)
385 </dd>
386 </dl><a NAME="CodeStyleCheckerDialog.__modifyOptions" ID="CodeStyleCheckerDialog.__modifyOptions"></a>
387 <h4>CodeStyleCheckerDialog.__modifyOptions</h4>
388 <b>__modifyOptions</b>(<i>source</i>)
389 <p>
390 Private method to modify the options based on eflag: entries.
391 </p><p>
392 This method looks for comment lines like '# eflag: noqa = M601'
393 at the end of the source in order to extend the list of excluded
394 messages for one file only.
395 </p><dl>
396 <dt><i>source</i></dt>
397 <dd>
398 source text (list of str or str)
399 </dd>
400 </dl><dl>
401 <dt>Returns:</dt>
402 <dd>
403 list of checker options
404 </dd>
405 </dl><a NAME="CodeStyleCheckerDialog.__processError" ID="CodeStyleCheckerDialog.__processError"></a>
406 <h4>CodeStyleCheckerDialog.__processError</h4>
407 <b>__processError</b>(<i>fn, msg</i>)
408 <p>
409 Private slot to process an error indication from the service.
410 </p><dl>
411 <dt><i>fn</i> (str)</dt>
412 <dd>
413 filename of the file
414 </dd><dt><i>msg</i> (str)</dt>
415 <dd>
416 error message
417 </dd>
418 </dl><a NAME="CodeStyleCheckerDialog.__processResult" ID="CodeStyleCheckerDialog.__processResult"></a>
419 <h4>CodeStyleCheckerDialog.__processResult</h4>
420 <b>__processResult</b>(<i>fn, codeStyleCheckerStats, fixes, results</i>)
421 <p>
422 Private slot called after perfoming a style check on one file.
423 </p><dl>
424 <dt><i>fn</i></dt>
425 <dd>
426 filename of the just checked file (str)
427 </dd><dt><i>codeStyleCheckerStats</i></dt>
428 <dd>
429 stats of style and name check (dict)
430 </dd><dt><i>fixes</i></dt>
431 <dd>
432 number of applied fixes (int)
433 </dd><dt><i>results</i></dt>
434 <dd>
435 tuple for each found violation of style (tuple of
436 lineno (int), position (int), text (str), ignored (bool),
437 fixed (bool), autofixing (bool))
438 </dd>
439 </dl><a NAME="CodeStyleCheckerDialog.__resetStatistics" ID="CodeStyleCheckerDialog.__resetStatistics"></a>
440 <h4>CodeStyleCheckerDialog.__resetStatistics</h4>
441 <b>__resetStatistics</b>(<i></i>)
442 <p>
443 Private slot to reset the statistics data.
444 </p><a NAME="CodeStyleCheckerDialog.__resort" ID="CodeStyleCheckerDialog.__resort"></a>
445 <h4>CodeStyleCheckerDialog.__resort</h4>
446 <b>__resort</b>(<i></i>)
447 <p>
448 Private method to resort the tree.
449 </p><a NAME="CodeStyleCheckerDialog.__selectCodes" ID="CodeStyleCheckerDialog.__selectCodes"></a>
450 <h4>CodeStyleCheckerDialog.__selectCodes</h4>
451 <b>__selectCodes</b>(<i>edit, showFixCodes</i>)
452 <p>
453 Private method to select message codes via a selection dialog.
454 </p><dl>
455 <dt><i>edit</i></dt>
456 <dd>
457 reference of the line edit to be populated (QLineEdit)
458 </dd><dt><i>showFixCodes</i></dt>
459 <dd>
460 flag indicating to show a list of fixable
461 issues (boolean)
462 </dd>
463 </dl><a NAME="CodeStyleCheckerDialog.__updateFixerStatistics" ID="CodeStyleCheckerDialog.__updateFixerStatistics"></a>
464 <h4>CodeStyleCheckerDialog.__updateFixerStatistics</h4>
465 <b>__updateFixerStatistics</b>(<i>fixer</i>)
466 <p>
467 Private method to update the collected fixer related statistics.
468 </p><dl>
469 <dt><i>fixer</i></dt>
470 <dd>
471 reference to the code style fixer (CodeStyleFixer)
472 </dd>
473 </dl><a NAME="CodeStyleCheckerDialog.__updateStatistics" ID="CodeStyleCheckerDialog.__updateStatistics"></a>
474 <h4>CodeStyleCheckerDialog.__updateStatistics</h4>
475 <b>__updateStatistics</b>(<i>statistics, fixer, ignoredErrors</i>)
476 <p>
477 Private method to update the collected statistics.
478 </p><dl>
479 <dt><i>statistics</i></dt>
480 <dd>
481 dictionary of statistical data with
482 message code as key and message count as value
483 </dd><dt><i>fixer</i></dt>
484 <dd>
485 reference to the code style fixer (CodeStyleFixer)
486 </dd><dt><i>ignoredErrors</i></dt>
487 <dd>
488 number of ignored errors (integer)
489 </dd>
490 </dl><a NAME="CodeStyleCheckerDialog.check" ID="CodeStyleCheckerDialog.check"></a>
491 <h4>CodeStyleCheckerDialog.check</h4>
492 <b>check</b>(<i>codestring=''</i>)
493 <p>
494 Public method to start a style check for one file.
495 </p><p>
496 The results are reported to the __processResult slot.
497 </p><dl>
498 <dt><i>codestring=</i></dt>
499 <dd>
500 optional sourcestring (str)
501 </dd>
502 </dl><a NAME="CodeStyleCheckerDialog.checkBatch" ID="CodeStyleCheckerDialog.checkBatch"></a>
503 <h4>CodeStyleCheckerDialog.checkBatch</h4>
504 <b>checkBatch</b>(<i></i>)
505 <p>
506 Public method to start a style check batch job.
507 </p><p>
508 The results are reported to the __processResult slot.
509 </p><a NAME="CodeStyleCheckerDialog.on_addBuiltinButton_clicked" ID="CodeStyleCheckerDialog.on_addBuiltinButton_clicked"></a>
510 <h4>CodeStyleCheckerDialog.on_addBuiltinButton_clicked</h4>
511 <b>on_addBuiltinButton_clicked</b>(<i></i>)
512 <p>
513 Private slot to add a built-in assignment to be ignored.
514 </p><a NAME="CodeStyleCheckerDialog.on_builtinsAssignmentList_itemSelectionChanged" ID="CodeStyleCheckerDialog.on_builtinsAssignmentList_itemSelectionChanged"></a>
515 <h4>CodeStyleCheckerDialog.on_builtinsAssignmentList_itemSelectionChanged</h4>
516 <b>on_builtinsAssignmentList_itemSelectionChanged</b>(<i></i>)
517 <p>
518 Private slot to react upon changes of the selected builtin assignments.
519 </p><a NAME="CodeStyleCheckerDialog.on_buttonBox_clicked" ID="CodeStyleCheckerDialog.on_buttonBox_clicked"></a>
520 <h4>CodeStyleCheckerDialog.on_buttonBox_clicked</h4>
521 <b>on_buttonBox_clicked</b>(<i>button</i>)
522 <p>
523 Private slot called by a button of the button box clicked.
524 </p><dl>
525 <dt><i>button</i></dt>
526 <dd>
527 button that was clicked (QAbstractButton)
528 </dd>
529 </dl><a NAME="CodeStyleCheckerDialog.on_deleteBuiltinButton_clicked" ID="CodeStyleCheckerDialog.on_deleteBuiltinButton_clicked"></a>
530 <h4>CodeStyleCheckerDialog.on_deleteBuiltinButton_clicked</h4>
531 <b>on_deleteBuiltinButton_clicked</b>(<i></i>)
532 <p>
533 Private slot to delete the selected items from the list.
534 </p><a NAME="CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked"></a>
535 <h4>CodeStyleCheckerDialog.on_excludeMessagesSelectButton_clicked</h4>
536 <b>on_excludeMessagesSelectButton_clicked</b>(<i></i>)
537 <p>
538 Private slot to select the message codes to be excluded via a
539 selection dialog.
540 </p><a NAME="CodeStyleCheckerDialog.on_fixButton_clicked" ID="CodeStyleCheckerDialog.on_fixButton_clicked"></a>
541 <h4>CodeStyleCheckerDialog.on_fixButton_clicked</h4>
542 <b>on_fixButton_clicked</b>(<i></i>)
543 <p>
544 Private slot to fix selected issues.
545 </p><p>
546 Build a dictionary of issues to fix. Update the initialized __options.
547 Then call check with the dict as keyparam to fix selected issues.
548 </p><a NAME="CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked"></a>
549 <h4>CodeStyleCheckerDialog.on_fixIssuesSelectButton_clicked</h4>
550 <b>on_fixIssuesSelectButton_clicked</b>(<i></i>)
551 <p>
552 Private slot to select the issue codes to be fixed via a
553 selection dialog.
554 </p><a NAME="CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked"></a>
555 <h4>CodeStyleCheckerDialog.on_includeMessagesSelectButton_clicked</h4>
556 <b>on_includeMessagesSelectButton_clicked</b>(<i></i>)
557 <p>
558 Private slot to select the message codes to be included via a
559 selection dialog.
560 </p><a NAME="CodeStyleCheckerDialog.on_loadDefaultButton_clicked" ID="CodeStyleCheckerDialog.on_loadDefaultButton_clicked"></a>
561 <h4>CodeStyleCheckerDialog.on_loadDefaultButton_clicked</h4>
562 <b>on_loadDefaultButton_clicked</b>(<i></i>)
563 <p>
564 Private slot to load the default configuration values.
565 </p><a NAME="CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked" ID="CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked"></a>
566 <h4>CodeStyleCheckerDialog.on_noFixIssuesSelectButton_clicked</h4>
567 <b>on_noFixIssuesSelectButton_clicked</b>(<i></i>)
568 <p>
569 Private slot to select the issue codes not to be fixed via a
570 selection dialog.
571 </p><a NAME="CodeStyleCheckerDialog.on_resetDefaultButton_clicked" ID="CodeStyleCheckerDialog.on_resetDefaultButton_clicked"></a>
572 <h4>CodeStyleCheckerDialog.on_resetDefaultButton_clicked</h4>
573 <b>on_resetDefaultButton_clicked</b>(<i></i>)
574 <p>
575 Private slot to reset the configuration values to their default values.
576 </p><a NAME="CodeStyleCheckerDialog.on_resultList_itemActivated" ID="CodeStyleCheckerDialog.on_resultList_itemActivated"></a>
577 <h4>CodeStyleCheckerDialog.on_resultList_itemActivated</h4>
578 <b>on_resultList_itemActivated</b>(<i>item, column</i>)
579 <p>
580 Private slot to handle the activation of an item.
581 </p><dl>
582 <dt><i>item</i></dt>
583 <dd>
584 reference to the activated item (QTreeWidgetItem)
585 </dd><dt><i>column</i></dt>
586 <dd>
587 column the item was activated in (integer)
588 </dd>
589 </dl><a NAME="CodeStyleCheckerDialog.on_resultList_itemSelectionChanged" ID="CodeStyleCheckerDialog.on_resultList_itemSelectionChanged"></a>
590 <h4>CodeStyleCheckerDialog.on_resultList_itemSelectionChanged</h4>
591 <b>on_resultList_itemSelectionChanged</b>(<i></i>)
592 <p>
593 Private slot to change the dialog state depending on the selection.
594 </p><a NAME="CodeStyleCheckerDialog.on_showButton_clicked" ID="CodeStyleCheckerDialog.on_showButton_clicked"></a>
595 <h4>CodeStyleCheckerDialog.on_showButton_clicked</h4>
596 <b>on_showButton_clicked</b>(<i></i>)
597 <p>
598 Private slot to handle the "Show" button press.
599 </p><a NAME="CodeStyleCheckerDialog.on_startButton_clicked" ID="CodeStyleCheckerDialog.on_startButton_clicked"></a>
600 <h4>CodeStyleCheckerDialog.on_startButton_clicked</h4>
601 <b>on_startButton_clicked</b>(<i></i>)
602 <p>
603 Private slot to start a code style check run.
604 </p><a NAME="CodeStyleCheckerDialog.on_statisticsButton_clicked" ID="CodeStyleCheckerDialog.on_statisticsButton_clicked"></a>
605 <h4>CodeStyleCheckerDialog.on_statisticsButton_clicked</h4>
606 <b>on_statisticsButton_clicked</b>(<i></i>)
607 <p>
608 Private slot to show the statistics dialog.
609 </p><a NAME="CodeStyleCheckerDialog.on_storeDefaultButton_clicked" ID="CodeStyleCheckerDialog.on_storeDefaultButton_clicked"></a>
610 <h4>CodeStyleCheckerDialog.on_storeDefaultButton_clicked</h4>
611 <b>on_storeDefaultButton_clicked</b>(<i></i>)
612 <p>
613 Private slot to store the current configuration values as
614 default values.
615 </p><a NAME="CodeStyleCheckerDialog.prepare" ID="CodeStyleCheckerDialog.prepare"></a>
616 <h4>CodeStyleCheckerDialog.prepare</h4>
617 <b>prepare</b>(<i>fileList, project</i>)
618 <p>
619 Public method to prepare the dialog with a list of filenames.
620 </p><dl>
621 <dt><i>fileList</i></dt>
622 <dd>
623 list of filenames (list of strings)
624 </dd><dt><i>project</i></dt>
625 <dd>
626 reference to the project object (Project)
627 </dd>
628 </dl><a NAME="CodeStyleCheckerDialog.start" ID="CodeStyleCheckerDialog.start"></a>
629 <h4>CodeStyleCheckerDialog.start</h4>
630 <b>start</b>(<i>fn, save=False, repeat=None</i>)
631 <p>
632 Public slot to start the code style check.
633 </p><dl>
634 <dt><i>fn</i></dt>
635 <dd>
636 file or list of files or directory to be checked
637 (string or list of strings)
638 </dd><dt><i>save=</i></dt>
639 <dd>
640 flag indicating to save the given
641 file/file list/directory (boolean)
642 </dd><dt><i>repeat=</i></dt>
643 <dd>
644 state of the repeat check box if it is not None
645 (None or boolean)
646 </dd>
647 </dl>
648 <div align="right"><a href="#top">Up</a></div>
649 <hr />
650 </body></html>

eric ide

mercurial