src/eric7/Documentation/Source/eric7.Plugins.PluginCodeStyleChecker.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.PluginCodeStyleChecker</h1> 9 <h1>eric7.Plugins.PluginCodeStyleChecker</h1>
10
11 <p> 10 <p>
12 Module implementing the code style checker plug-in. 11 Module implementing the code style checker plug-in.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15 15 <table>
16 <table> 16 <tr><td>__header__</td></tr>
17 <tr><td>__header__</td></tr><tr><td>error</td></tr> 17 <tr><td>error</td></tr>
18 </table> 18 </table>
19
19 <h3>Classes</h3> 20 <h3>Classes</h3>
20 21 <table>
21 <table>
22
23 <tr> 22 <tr>
24 <td><a href="#CodeStyleCheckerPlugin">CodeStyleCheckerPlugin</a></td> 23 <td><a href="#CodeStyleCheckerPlugin">CodeStyleCheckerPlugin</a></td>
25 <td>Class implementing the code style checker plug-in.</td> 24 <td>Class implementing the code style checker plug-in.</td>
26 </tr> 25 </tr>
27 </table> 26 </table>
27
28 <h3>Functions</h3> 28 <h3>Functions</h3>
29
30 <table> 29 <table>
31 <tr><td>None</td></tr> 30 <tr><td>None</td></tr>
32 </table> 31 </table>
32
33 <hr /> 33 <hr />
34 <hr /> 34 <hr />
35 <a NAME="CodeStyleCheckerPlugin" ID="CodeStyleCheckerPlugin"></a> 35 <a NAME="CodeStyleCheckerPlugin" ID="CodeStyleCheckerPlugin"></a>
36 <h2>CodeStyleCheckerPlugin</h2> 36 <h2>CodeStyleCheckerPlugin</h2>
37
38 <p> 37 <p>
39 Class implementing the code style checker plug-in. 38 Class implementing the code style checker plug-in.
40 </p> 39 </p>
40
41 <h3>Signals</h3> 41 <h3>Signals</h3>
42 <dl> 42 <dl>
43 43
44 <dt>batchFinished()</dt> 44 <dt>batchFinished()</dt>
45 <dd> 45 <dd>
56 </dd> 56 </dd>
57 </dl> 57 </dl>
58 <h3>Derived from</h3> 58 <h3>Derived from</h3>
59 QObject 59 QObject
60 <h3>Class Attributes</h3> 60 <h3>Class Attributes</h3>
61
62 <table> 61 <table>
63 <tr><td>None</td></tr> 62 <tr><td>None</td></tr>
64 </table> 63 </table>
64
65 <h3>Class Methods</h3> 65 <h3>Class Methods</h3>
66
67 <table> 66 <table>
68 <tr><td>None</td></tr> 67 <tr><td>None</td></tr>
69 </table> 68 </table>
69
70 <h3>Methods</h3> 70 <h3>Methods</h3>
71 71 <table>
72 <table>
73
74 <tr> 72 <tr>
75 <td><a href="#CodeStyleCheckerPlugin.__init__">CodeStyleCheckerPlugin</a></td> 73 <td><a href="#CodeStyleCheckerPlugin.__init__">CodeStyleCheckerPlugin</a></td>
76 <td>Constructor</td> 74 <td>Constructor</td>
77 </tr> 75 </tr>
78 <tr> 76 <tr>
146 <tr> 144 <tr>
147 <td><a href="#CodeStyleCheckerPlugin.styleCheck">styleCheck</a></td> 145 <td><a href="#CodeStyleCheckerPlugin.styleCheck">styleCheck</a></td>
148 <td>Public method to prepare a style check on one Python source file.</td> 146 <td>Public method to prepare a style check on one Python source file.</td>
149 </tr> 147 </tr>
150 </table> 148 </table>
149
151 <h3>Static Methods</h3> 150 <h3>Static Methods</h3>
152
153 <table> 151 <table>
154 <tr><td>None</td></tr> 152 <tr><td>None</td></tr>
155 </table> 153 </table>
154
156 155
157 <a NAME="CodeStyleCheckerPlugin.__init__" ID="CodeStyleCheckerPlugin.__init__"></a> 156 <a NAME="CodeStyleCheckerPlugin.__init__" ID="CodeStyleCheckerPlugin.__init__"></a>
158 <h4>CodeStyleCheckerPlugin (Constructor)</h4> 157 <h4>CodeStyleCheckerPlugin (Constructor)</h4>
159 <b>CodeStyleCheckerPlugin</b>(<i>ui</i>) 158 <b>CodeStyleCheckerPlugin</b>(<i>ui</i>)
160
161 <p> 159 <p>
162 Constructor 160 Constructor
163 </p> 161 </p>
162
164 <dl> 163 <dl>
165 164
166 <dt><i>ui</i> (UserInterface)</dt> 165 <dt><i>ui</i> (UserInterface)</dt>
167 <dd> 166 <dd>
168 reference to the user interface object 167 reference to the user interface object
169 </dd> 168 </dd>
170 </dl> 169 </dl>
171 <a NAME="CodeStyleCheckerPlugin.__editorClosed" ID="CodeStyleCheckerPlugin.__editorClosed"></a> 170 <a NAME="CodeStyleCheckerPlugin.__editorClosed" ID="CodeStyleCheckerPlugin.__editorClosed"></a>
172 <h4>CodeStyleCheckerPlugin.__editorClosed</h4> 171 <h4>CodeStyleCheckerPlugin.__editorClosed</h4>
173 <b>__editorClosed</b>(<i>editor</i>) 172 <b>__editorClosed</b>(<i>editor</i>)
174
175 <p> 173 <p>
176 Private slot called, when an editor was closed. 174 Private slot called, when an editor was closed.
177 </p> 175 </p>
176
178 <dl> 177 <dl>
179 178
180 <dt><i>editor</i> (Editor)</dt> 179 <dt><i>editor</i> (Editor)</dt>
181 <dd> 180 <dd>
182 reference to the editor 181 reference to the editor
183 </dd> 182 </dd>
184 </dl> 183 </dl>
185 <a NAME="CodeStyleCheckerPlugin.__editorCodeStyleCheck" ID="CodeStyleCheckerPlugin.__editorCodeStyleCheck"></a> 184 <a NAME="CodeStyleCheckerPlugin.__editorCodeStyleCheck" ID="CodeStyleCheckerPlugin.__editorCodeStyleCheck"></a>
186 <h4>CodeStyleCheckerPlugin.__editorCodeStyleCheck</h4> 185 <h4>CodeStyleCheckerPlugin.__editorCodeStyleCheck</h4>
187 <b>__editorCodeStyleCheck</b>(<i></i>) 186 <b>__editorCodeStyleCheck</b>(<i></i>)
188
189 <p> 187 <p>
190 Private slot to handle the code style check context menu action 188 Private slot to handle the code style check context menu action
191 of the editors. 189 of the editors.
192 </p> 190 </p>
191
193 <a NAME="CodeStyleCheckerPlugin.__editorOpened" ID="CodeStyleCheckerPlugin.__editorOpened"></a> 192 <a NAME="CodeStyleCheckerPlugin.__editorOpened" ID="CodeStyleCheckerPlugin.__editorOpened"></a>
194 <h4>CodeStyleCheckerPlugin.__editorOpened</h4> 193 <h4>CodeStyleCheckerPlugin.__editorOpened</h4>
195 <b>__editorOpened</b>(<i>editor</i>) 194 <b>__editorOpened</b>(<i>editor</i>)
196
197 <p> 195 <p>
198 Private slot called, when a new editor was opened. 196 Private slot called, when a new editor was opened.
199 </p> 197 </p>
198
200 <dl> 199 <dl>
201 200
202 <dt><i>editor</i> (Editor)</dt> 201 <dt><i>editor</i> (Editor)</dt>
203 <dd> 202 <dd>
204 reference to the new editor 203 reference to the new editor
205 </dd> 204 </dd>
206 </dl> 205 </dl>
207 <a NAME="CodeStyleCheckerPlugin.__editorShowMenu" ID="CodeStyleCheckerPlugin.__editorShowMenu"></a> 206 <a NAME="CodeStyleCheckerPlugin.__editorShowMenu" ID="CodeStyleCheckerPlugin.__editorShowMenu"></a>
208 <h4>CodeStyleCheckerPlugin.__editorShowMenu</h4> 207 <h4>CodeStyleCheckerPlugin.__editorShowMenu</h4>
209 <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>) 208 <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>)
210
211 <p> 209 <p>
212 Private slot called, when the the editor context menu or a submenu is 210 Private slot called, when the the editor context menu or a submenu is
213 about to be shown. 211 about to be shown.
214 </p> 212 </p>
213
215 <dl> 214 <dl>
216 215
217 <dt><i>menuName</i> (str)</dt> 216 <dt><i>menuName</i> (str)</dt>
218 <dd> 217 <dd>
219 name of the menu to be shown 218 name of the menu to be shown
228 </dd> 227 </dd>
229 </dl> 228 </dl>
230 <a NAME="CodeStyleCheckerPlugin.__initialize" ID="CodeStyleCheckerPlugin.__initialize"></a> 229 <a NAME="CodeStyleCheckerPlugin.__initialize" ID="CodeStyleCheckerPlugin.__initialize"></a>
231 <h4>CodeStyleCheckerPlugin.__initialize</h4> 230 <h4>CodeStyleCheckerPlugin.__initialize</h4>
232 <b>__initialize</b>(<i></i>) 231 <b>__initialize</b>(<i></i>)
233
234 <p> 232 <p>
235 Private slot to (re)initialize the plugin. 233 Private slot to (re)initialize the plugin.
236 </p> 234 </p>
235
237 <a NAME="CodeStyleCheckerPlugin.__projectBrowserCodeStyleCheck" ID="CodeStyleCheckerPlugin.__projectBrowserCodeStyleCheck"></a> 236 <a NAME="CodeStyleCheckerPlugin.__projectBrowserCodeStyleCheck" ID="CodeStyleCheckerPlugin.__projectBrowserCodeStyleCheck"></a>
238 <h4>CodeStyleCheckerPlugin.__projectBrowserCodeStyleCheck</h4> 237 <h4>CodeStyleCheckerPlugin.__projectBrowserCodeStyleCheck</h4>
239 <b>__projectBrowserCodeStyleCheck</b>(<i></i>) 238 <b>__projectBrowserCodeStyleCheck</b>(<i></i>)
240
241 <p> 239 <p>
242 Private method to handle the code style check context menu action of 240 Private method to handle the code style check context menu action of
243 the project sources browser. 241 the project sources browser.
244 </p> 242 </p>
243
245 <a NAME="CodeStyleCheckerPlugin.__projectBrowserShowMenu" ID="CodeStyleCheckerPlugin.__projectBrowserShowMenu"></a> 244 <a NAME="CodeStyleCheckerPlugin.__projectBrowserShowMenu" ID="CodeStyleCheckerPlugin.__projectBrowserShowMenu"></a>
246 <h4>CodeStyleCheckerPlugin.__projectBrowserShowMenu</h4> 245 <h4>CodeStyleCheckerPlugin.__projectBrowserShowMenu</h4>
247 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>) 246 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>)
248
249 <p> 247 <p>
250 Private slot called, when the the project browser menu or a submenu is 248 Private slot called, when the the project browser menu or a submenu is
251 about to be shown. 249 about to be shown.
252 </p> 250 </p>
251
253 <dl> 252 <dl>
254 253
255 <dt><i>menuName</i> (str)</dt> 254 <dt><i>menuName</i> (str)</dt>
256 <dd> 255 <dd>
257 name of the menu to be shown 256 name of the menu to be shown
262 </dd> 261 </dd>
263 </dl> 262 </dl>
264 <a NAME="CodeStyleCheckerPlugin.__projectCodeStyleCheck" ID="CodeStyleCheckerPlugin.__projectCodeStyleCheck"></a> 263 <a NAME="CodeStyleCheckerPlugin.__projectCodeStyleCheck" ID="CodeStyleCheckerPlugin.__projectCodeStyleCheck"></a>
265 <h4>CodeStyleCheckerPlugin.__projectCodeStyleCheck</h4> 264 <h4>CodeStyleCheckerPlugin.__projectCodeStyleCheck</h4>
266 <b>__projectCodeStyleCheck</b>(<i></i>) 265 <b>__projectCodeStyleCheck</b>(<i></i>)
267
268 <p> 266 <p>
269 Private slot used to check the project files for code style. 267 Private slot used to check the project files for code style.
270 </p> 268 </p>
269
271 <a NAME="CodeStyleCheckerPlugin.__projectShowMenu" ID="CodeStyleCheckerPlugin.__projectShowMenu"></a> 270 <a NAME="CodeStyleCheckerPlugin.__projectShowMenu" ID="CodeStyleCheckerPlugin.__projectShowMenu"></a>
272 <h4>CodeStyleCheckerPlugin.__projectShowMenu</h4> 271 <h4>CodeStyleCheckerPlugin.__projectShowMenu</h4>
273 <b>__projectShowMenu</b>(<i>menuName, menu</i>) 272 <b>__projectShowMenu</b>(<i>menuName, menu</i>)
274
275 <p> 273 <p>
276 Private slot called, when the the project menu or a submenu is 274 Private slot called, when the the project menu or a submenu is
277 about to be shown. 275 about to be shown.
278 </p> 276 </p>
277
279 <dl> 278 <dl>
280 279
281 <dt><i>menuName</i> (str)</dt> 280 <dt><i>menuName</i> (str)</dt>
282 <dd> 281 <dd>
283 name of the menu to be shown 282 name of the menu to be shown
288 </dd> 287 </dd>
289 </dl> 288 </dl>
290 <a NAME="CodeStyleCheckerPlugin.__serviceError" ID="CodeStyleCheckerPlugin.__serviceError"></a> 289 <a NAME="CodeStyleCheckerPlugin.__serviceError" ID="CodeStyleCheckerPlugin.__serviceError"></a>
291 <h4>CodeStyleCheckerPlugin.__serviceError</h4> 290 <h4>CodeStyleCheckerPlugin.__serviceError</h4>
292 <b>__serviceError</b>(<i>fn, msg</i>) 291 <b>__serviceError</b>(<i>fn, msg</i>)
293
294 <p> 292 <p>
295 Private slot handling service errors. 293 Private slot handling service errors.
296 </p> 294 </p>
295
297 <dl> 296 <dl>
298 297
299 <dt><i>fn</i> (str)</dt> 298 <dt><i>fn</i> (str)</dt>
300 <dd> 299 <dd>
301 file name 300 file name
306 </dd> 305 </dd>
307 </dl> 306 </dl>
308 <a NAME="CodeStyleCheckerPlugin.__translateStyleCheck" ID="CodeStyleCheckerPlugin.__translateStyleCheck"></a> 307 <a NAME="CodeStyleCheckerPlugin.__translateStyleCheck" ID="CodeStyleCheckerPlugin.__translateStyleCheck"></a>
309 <h4>CodeStyleCheckerPlugin.__translateStyleCheck</h4> 308 <h4>CodeStyleCheckerPlugin.__translateStyleCheck</h4>
310 <b>__translateStyleCheck</b>(<i>fn, codeStyleCheckerStats, results</i>) 309 <b>__translateStyleCheck</b>(<i>fn, codeStyleCheckerStats, results</i>)
311
312 <p> 310 <p>
313 Private slot called after performing a style check on one file. 311 Private slot called after performing a style check on one file.
314 </p> 312 </p>
313
315 <dl> 314 <dl>
316 315
317 <dt><i>fn</i> (str)</dt> 316 <dt><i>fn</i> (str)</dt>
318 <dd> 317 <dd>
319 filename of the just checked file 318 filename of the just checked file
329 </dd> 328 </dd>
330 </dl> 329 </dl>
331 <a NAME="CodeStyleCheckerPlugin.activate" ID="CodeStyleCheckerPlugin.activate"></a> 330 <a NAME="CodeStyleCheckerPlugin.activate" ID="CodeStyleCheckerPlugin.activate"></a>
332 <h4>CodeStyleCheckerPlugin.activate</h4> 331 <h4>CodeStyleCheckerPlugin.activate</h4>
333 <b>activate</b>(<i></i>) 332 <b>activate</b>(<i></i>)
334
335 <p> 333 <p>
336 Public method to activate this plugin. 334 Public method to activate this plugin.
337 </p> 335 </p>
336
338 <dl> 337 <dl>
339 <dt>Return:</dt> 338 <dt>Return:</dt>
340 <dd> 339 <dd>
341 tuple of None and activation status 340 tuple of None and activation status
342 </dd> 341 </dd>
348 </dd> 347 </dd>
349 </dl> 348 </dl>
350 <a NAME="CodeStyleCheckerPlugin.batchJobDone" ID="CodeStyleCheckerPlugin.batchJobDone"></a> 349 <a NAME="CodeStyleCheckerPlugin.batchJobDone" ID="CodeStyleCheckerPlugin.batchJobDone"></a>
351 <h4>CodeStyleCheckerPlugin.batchJobDone</h4> 350 <h4>CodeStyleCheckerPlugin.batchJobDone</h4>
352 <b>batchJobDone</b>(<i>fx, lang</i>) 351 <b>batchJobDone</b>(<i>fx, lang</i>)
353
354 <p> 352 <p>
355 Public slot handling the completion of a batch job. 353 Public slot handling the completion of a batch job.
356 </p> 354 </p>
355
357 <dl> 356 <dl>
358 357
359 <dt><i>fx</i> (str)</dt> 358 <dt><i>fx</i> (str)</dt>
360 <dd> 359 <dd>
361 service name 360 service name
366 </dd> 365 </dd>
367 </dl> 366 </dl>
368 <a NAME="CodeStyleCheckerPlugin.cancelStyleBatchCheck" ID="CodeStyleCheckerPlugin.cancelStyleBatchCheck"></a> 367 <a NAME="CodeStyleCheckerPlugin.cancelStyleBatchCheck" ID="CodeStyleCheckerPlugin.cancelStyleBatchCheck"></a>
369 <h4>CodeStyleCheckerPlugin.cancelStyleBatchCheck</h4> 368 <h4>CodeStyleCheckerPlugin.cancelStyleBatchCheck</h4>
370 <b>cancelStyleBatchCheck</b>(<i></i>) 369 <b>cancelStyleBatchCheck</b>(<i></i>)
371
372 <p> 370 <p>
373 Public method to cancel all batch jobs. 371 Public method to cancel all batch jobs.
374 </p> 372 </p>
373
375 <a NAME="CodeStyleCheckerPlugin.deactivate" ID="CodeStyleCheckerPlugin.deactivate"></a> 374 <a NAME="CodeStyleCheckerPlugin.deactivate" ID="CodeStyleCheckerPlugin.deactivate"></a>
376 <h4>CodeStyleCheckerPlugin.deactivate</h4> 375 <h4>CodeStyleCheckerPlugin.deactivate</h4>
377 <b>deactivate</b>(<i></i>) 376 <b>deactivate</b>(<i></i>)
378
379 <p> 377 <p>
380 Public method to deactivate this plugin. 378 Public method to deactivate this plugin.
381 </p> 379 </p>
380
382 <a NAME="CodeStyleCheckerPlugin.serviceErrorPy3" ID="CodeStyleCheckerPlugin.serviceErrorPy3"></a> 381 <a NAME="CodeStyleCheckerPlugin.serviceErrorPy3" ID="CodeStyleCheckerPlugin.serviceErrorPy3"></a>
383 <h4>CodeStyleCheckerPlugin.serviceErrorPy3</h4> 382 <h4>CodeStyleCheckerPlugin.serviceErrorPy3</h4>
384 <b>serviceErrorPy3</b>(<i>fx, lang, fn, msg</i>) 383 <b>serviceErrorPy3</b>(<i>fx, lang, fn, msg</i>)
385
386 <p> 384 <p>
387 Public slot handling service errors for Python 3. 385 Public slot handling service errors for Python 3.
388 </p> 386 </p>
387
389 <dl> 388 <dl>
390 389
391 <dt><i>fx</i> (str)</dt> 390 <dt><i>fx</i> (str)</dt>
392 <dd> 391 <dd>
393 service name 392 service name
406 </dd> 405 </dd>
407 </dl> 406 </dl>
408 <a NAME="CodeStyleCheckerPlugin.styleBatchCheck" ID="CodeStyleCheckerPlugin.styleBatchCheck"></a> 407 <a NAME="CodeStyleCheckerPlugin.styleBatchCheck" ID="CodeStyleCheckerPlugin.styleBatchCheck"></a>
409 <h4>CodeStyleCheckerPlugin.styleBatchCheck</h4> 408 <h4>CodeStyleCheckerPlugin.styleBatchCheck</h4>
410 <b>styleBatchCheck</b>(<i>argumentsList</i>) 409 <b>styleBatchCheck</b>(<i>argumentsList</i>)
411
412 <p> 410 <p>
413 Public method to prepare a style check on multiple Python source files. 411 Public method to prepare a style check on multiple Python source files.
414 </p> 412 </p>
413
415 <dl> 414 <dl>
416 415
417 <dt><i>argumentsList</i> (list of tuple of (str, str, list))</dt> 416 <dt><i>argumentsList</i> (list of tuple of (str, str, list))</dt>
418 <dd> 417 <dd>
419 list of arguments tuples with each tuple 418 list of arguments tuples with each tuple
422 </dd> 421 </dd>
423 </dl> 422 </dl>
424 <a NAME="CodeStyleCheckerPlugin.styleCheck" ID="CodeStyleCheckerPlugin.styleCheck"></a> 423 <a NAME="CodeStyleCheckerPlugin.styleCheck" ID="CodeStyleCheckerPlugin.styleCheck"></a>
425 <h4>CodeStyleCheckerPlugin.styleCheck</h4> 424 <h4>CodeStyleCheckerPlugin.styleCheck</h4>
426 <b>styleCheck</b>(<i>lang, filename, source, args</i>) 425 <b>styleCheck</b>(<i>lang, filename, source, args</i>)
427
428 <p> 426 <p>
429 Public method to prepare a style check on one Python source file. 427 Public method to prepare a style check on one Python source file.
430 </p> 428 </p>
429
431 <dl> 430 <dl>
432 431
433 <dt><i>lang</i> (str or None)</dt> 432 <dt><i>lang</i> (str or None)</dt>
434 <dd> 433 <dd>
435 language of the file or None to determine by internal 434 language of the file or None to determine by internal

eric ide

mercurial