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

changeset 4218
f542ad1f76c5
parent 3673
e26d7d0c1088
child 4222
1db92cbf62c9
equal deleted inserted replaced
4217:38e8903f9c2f 4218:f542ad1f76c5
35 </tr> 35 </tr>
36 </table> 36 </table>
37 <h3>Functions</h3> 37 <h3>Functions</h3>
38 <table> 38 <table>
39 <tr> 39 <tr>
40 <td><a href="#__checkCodeStyle">__checkCodeStyle</a></td>
41 <td>Private module function to perform the code style check and/or fix found errors.</td>
42 </tr><tr>
43 <td><a href="#codeStyleBatchCheck">codeStyleBatchCheck</a></td>
44 <td>Module function to check code style for a batch of files.</td>
45 </tr><tr>
40 <td><a href="#codeStyleCheck">codeStyleCheck</a></td> 46 <td><a href="#codeStyleCheck">codeStyleCheck</a></td>
41 <td>Do the code style check and/ or fix found errors.</td> 47 <td>Do the code style check and/ or fix found errors.</td>
42 </tr><tr> 48 </tr><tr>
43 <td><a href="#extractLineFlags">extractLineFlags</a></td> 49 <td><a href="#extractLineFlags">extractLineFlags</a></td>
44 <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>
45 </tr><tr> 51 </tr><tr>
52 <td><a href="#initBatchService">initBatchService</a></td>
53 <td>Initialize the batch service and return the entry point.</td>
54 </tr><tr>
46 <td><a href="#initService">initService</a></td> 55 <td><a href="#initService">initService</a></td>
47 <td>Initialize the service and return the entry point.</td> 56 <td>Initialize the service and return the entry point.</td>
57 </tr><tr>
58 <td><a href="#worker">worker</a></td>
59 <td>Module function acting as the parallel worker for the style check.</td>
48 </tr> 60 </tr>
49 </table> 61 </table>
50 <hr /><hr /> 62 <hr /><hr />
51 <a NAME="CodeStyleCheckerReport" ID="CodeStyleCheckerReport"></a> 63 <a NAME="CodeStyleCheckerReport" ID="CodeStyleCheckerReport"></a>
52 <h2>CodeStyleCheckerReport</h2> 64 <h2>CodeStyleCheckerReport</h2>
115 error code (string) 127 error code (string)
116 </dd> 128 </dd>
117 </dl> 129 </dl>
118 <div align="right"><a href="#top">Up</a></div> 130 <div align="right"><a href="#top">Up</a></div>
119 <hr /><hr /> 131 <hr /><hr />
120 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a> 132 <a NAME="__checkCodeStyle" ID="__checkCodeStyle"></a>
121 <h2>codeStyleCheck</h2> 133 <h2>__checkCodeStyle</h2>
122 <b>codeStyleCheck</b>(<i>filename, source, args</i>) 134 <b>__checkCodeStyle</b>(<i>filename, source, args</i>)
123 <p> 135 <p>
124 Do the code style check and/ or fix found errors. 136 Private module function to perform the code style check and/or fix
137 found errors.
125 </p><dl> 138 </p><dl>
126 <dt><i>filename</i></dt> 139 <dt><i>filename</i></dt>
127 <dd> 140 <dd>
128 source filename (string) 141 source filename (string)
129 </dd><dt><i>source</i></dt> 142 </dd><dt><i>source</i></dt>
145 (bool), fixed (bool), autofixing (bool), fixedMsg (str))) 158 (bool), fixed (bool), autofixing (bool), fixedMsg (str)))
146 </dd> 159 </dd>
147 </dl> 160 </dl>
148 <div align="right"><a href="#top">Up</a></div> 161 <div align="right"><a href="#top">Up</a></div>
149 <hr /><hr /> 162 <hr /><hr />
163 <a NAME="codeStyleBatchCheck" ID="codeStyleBatchCheck"></a>
164 <h2>codeStyleBatchCheck</h2>
165 <b>codeStyleBatchCheck</b>(<i>argumentsList, send, fx</i>)
166 <p>
167 Module function to check code style for a batch of files.
168 </p><dl>
169 <dt><i>argumentsList</i></dt>
170 <dd>
171 list of arguments tuples as given for codeStyleCheck
172 </dd><dt><i>send</i></dt>
173 <dd>
174 reference to send method
175 </dd><dt><i>fx</i></dt>
176 <dd>
177 registered service name (string)
178 </dd>
179 </dl>
180 <div align="right"><a href="#top">Up</a></div>
181 <hr /><hr />
182 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a>
183 <h2>codeStyleCheck</h2>
184 <b>codeStyleCheck</b>(<i>filename, source, args</i>)
185 <p>
186 Do the code style check and/ or fix found errors.
187 </p><dl>
188 <dt><i>filename</i></dt>
189 <dd>
190 source filename (string)
191 </dd><dt><i>source</i></dt>
192 <dd>
193 string containing the code to check (string)
194 </dd><dt><i>args</i></dt>
195 <dd>
196 arguments used by the codeStyleCheck function (list of
197 excludeMessages (str), includeMessages (str), repeatMessages
198 (bool), fixCodes (str), noFixCodes (str), fixIssues (bool),
199 maxLineLength (int), hangClosing (bool), docType (str), errors
200 (list of str), eol (str), encoding (str), backup (bool))
201 </dd>
202 </dl><dl>
203 <dt>Returns:</dt>
204 <dd>
205 tuple of stats (dict) and results (tuple for each found violation
206 of style (tuple of lineno (int), position (int), text (str), ignored
207 (bool), fixed (bool), autofixing (bool), fixedMsg (str)))
208 </dd>
209 </dl>
210 <div align="right"><a href="#top">Up</a></div>
211 <hr /><hr />
150 <a NAME="extractLineFlags" ID="extractLineFlags"></a> 212 <a NAME="extractLineFlags" ID="extractLineFlags"></a>
151 <h2>extractLineFlags</h2> 213 <h2>extractLineFlags</h2>
152 <b>extractLineFlags</b>(<i>line, startComment="</i>) 214 <b>extractLineFlags</b>(<i>line, startComment="</i>)
153 <p> 215 <p>
154 Function to extract flags starting and ending with '__' from a line 216 Function to extract flags starting and ending with '__' from a line
170 list containing the extracted flags (list of strings) 232 list containing the extracted flags (list of strings)
171 </dd> 233 </dd>
172 </dl> 234 </dl>
173 <div align="right"><a href="#top">Up</a></div> 235 <div align="right"><a href="#top">Up</a></div>
174 <hr /><hr /> 236 <hr /><hr />
237 <a NAME="initBatchService" ID="initBatchService"></a>
238 <h2>initBatchService</h2>
239 <b>initBatchService</b>(<i></i>)
240 <p>
241 Initialize the batch service and return the entry point.
242 </p><dl>
243 <dt>Returns:</dt>
244 <dd>
245 the entry point for the background client (function)
246 </dd>
247 </dl>
248 <div align="right"><a href="#top">Up</a></div>
249 <hr /><hr />
175 <a NAME="initService" ID="initService"></a> 250 <a NAME="initService" ID="initService"></a>
176 <h2>initService</h2> 251 <h2>initService</h2>
177 <b>initService</b>(<i></i>) 252 <b>initService</b>(<i></i>)
178 <p> 253 <p>
179 Initialize the service and return the entry point. 254 Initialize the service and return the entry point.
182 <dd> 257 <dd>
183 the entry point for the background client (function) 258 the entry point for the background client (function)
184 </dd> 259 </dd>
185 </dl> 260 </dl>
186 <div align="right"><a href="#top">Up</a></div> 261 <div align="right"><a href="#top">Up</a></div>
262 <hr /><hr />
263 <a NAME="worker" ID="worker"></a>
264 <h2>worker</h2>
265 <b>worker</b>(<i>input, output</i>)
266 <p>
267 Module function acting as the parallel worker for the style check.
268 </p><dl>
269 <dt><i>input</i></dt>
270 <dd>
271 input queue (multiprocessing.Queue)
272 </dd><dt><i>output</i></dt>
273 <dd>
274 output queue (multiprocessing.Queue)
275 </dd>
276 </dl>
277 <div align="right"><a href="#top">Up</a></div>
187 <hr /> 278 <hr />
188 </body></html> 279 </body></html>

eric ide

mercurial