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

changeset 6264
04a671fa4adb
parent 5762
76ef5f340007
child 6807
7e5eba19d86d
equal deleted inserted replaced
6263:4dd53711d869 6264:04a671fa4adb
42 </tr><tr> 42 </tr><tr>
43 <td><a href="#codeStyleBatchCheck">codeStyleBatchCheck</a></td> 43 <td><a href="#codeStyleBatchCheck">codeStyleBatchCheck</a></td>
44 <td>Module function to check code style for a batch of files.</td> 44 <td>Module function to check code style for a batch of files.</td>
45 </tr><tr> 45 </tr><tr>
46 <td><a href="#codeStyleCheck">codeStyleCheck</a></td> 46 <td><a href="#codeStyleCheck">codeStyleCheck</a></td>
47 <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>
48 </tr><tr> 48 </tr><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><tr> 51 </tr><tr>
52 <td><a href="#ignoreCode">ignoreCode</a></td> 52 <td><a href="#ignoreCode">ignoreCode</a></td>
137 <b>__checkCodeStyle</b>(<i>filename, source, args</i>) 137 <b>__checkCodeStyle</b>(<i>filename, source, args</i>)
138 <p> 138 <p>
139 Private module function to perform the code style check and/or fix 139 Private module function to perform the code style check and/or fix
140 found errors. 140 found errors.
141 </p><dl> 141 </p><dl>
142 <dt><i>filename</i></dt> 142 <dt><i>filename</i> (str)</dt>
143 <dd> 143 <dd>
144 source filename (string) 144 source filename
145 </dd><dt><i>source</i></dt> 145 </dd><dt><i>source</i> (str)</dt>
146 <dd> 146 <dd>
147 string containing the code to check (string) 147 string containing the code to check
148 </dd><dt><i>args</i></dt> 148 </dd><dt><i>args</i> (list of (str, str, bool, str, str, bool, int, list of (int, int),)</dt>
149 <dd> 149 <dd>
150 arguments used by the codeStyleCheck function (list of 150 arguments used by the codeStyleCheck function (list of
151 excludeMessages (str), includeMessages (str), repeatMessages 151 excludeMessages, includeMessages, repeatMessages, fixCodes,
152 (bool), fixCodes (str), noFixCodes (str), fixIssues (bool), 152 noFixCodes, fixIssues, maxLineLength, blankLines, hangClosing,
153 maxLineLength (int), hangClosing (bool), docType (str), dictionary 153 docType, codeComplexityArgs, miscellaneousArgs, errors, eol,
154 with arguments for the code complexity checker (dict), dictionary 154 encoding, backup)
155 with arguments for the miscellaneous checker (dict), errors (list 155 bool, str, dict, dict, list of str, str, str, bool)
156 of str), eol (str), encoding (str), backup (bool)) 156 </dd>
157 </dd> 157 </dl><dl>
158 </dl><dl> 158 <dt>Returns:</dt>
159 <dt>Returns:</dt> 159 <dd>
160 <dd> 160 tuple of statistics (dict) and list of results (tuple for each
161 tuple of statistics (dict) and results (tuple for each found 161 found violation of style (lineno, position, text, ignored, fixed,
162 violation of style (tuple of lineno (int), position (int), text (str), 162 autofixing, fixedMsg))
163 ignored (bool), fixed (bool), autofixing (bool), fixedMsg (str))) 163 </dd>
164 </dl><dl>
165 <dt>Return Type:</dt>
166 <dd>
167 tuple of (dict, list of tuples of (int, int, str, bool, bool, bool,
168 str))
164 </dd> 169 </dd>
165 </dl> 170 </dl>
166 <div align="right"><a href="#top">Up</a></div> 171 <div align="right"><a href="#top">Up</a></div>
167 <hr /><hr /> 172 <hr /><hr />
168 <a NAME="codeStyleBatchCheck" ID="codeStyleBatchCheck"></a> 173 <a NAME="codeStyleBatchCheck" ID="codeStyleBatchCheck"></a>
192 <hr /><hr /> 197 <hr /><hr />
193 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a> 198 <a NAME="codeStyleCheck" ID="codeStyleCheck"></a>
194 <h2>codeStyleCheck</h2> 199 <h2>codeStyleCheck</h2>
195 <b>codeStyleCheck</b>(<i>filename, source, args</i>) 200 <b>codeStyleCheck</b>(<i>filename, source, args</i>)
196 <p> 201 <p>
197 Do the code style check and/ or fix found errors. 202 Do the code style check and/or fix found errors.
198 </p><dl> 203 </p><dl>
199 <dt><i>filename</i></dt> 204 <dt><i>filename</i> (str)</dt>
200 <dd> 205 <dd>
201 source filename (string) 206 source filename
202 </dd><dt><i>source</i></dt> 207 </dd><dt><i>source</i> (str)</dt>
203 <dd> 208 <dd>
204 string containing the code to check (string) 209 string containing the code to check
205 </dd><dt><i>args</i></dt> 210 </dd><dt><i>args</i> (list of (str, str, bool, str, str, bool, int, list of (int, int),)</dt>
206 <dd> 211 <dd>
207 arguments used by the codeStyleCheck function (list of 212 arguments used by the codeStyleCheck function (list of
208 excludeMessages (str), includeMessages (str), repeatMessages 213 excludeMessages, includeMessages, repeatMessages, fixCodes,
209 (bool), fixCodes (str), noFixCodes (str), fixIssues (bool), 214 noFixCodes, fixIssues, maxLineLength, blankLines, hangClosing,
210 maxLineLength (int), hangClosing (bool), docType (str), errors 215 docType, codeComplexityArgs, miscellaneousArgs, errors, eol,
211 (list of str), eol (str), encoding (str), backup (bool)) 216 encoding, backup)
212 </dd> 217 bool, str, dict, dict, list of str, str, str, bool)
213 </dl><dl> 218 </dd>
214 <dt>Returns:</dt> 219 </dl><dl>
215 <dd> 220 <dt>Returns:</dt>
216 tuple of stats (dict) and results (tuple for each found violation 221 <dd>
217 of style (tuple of lineno (int), position (int), text (str), ignored 222 tuple of statistics (dict) and list of results (tuple for each
218 (bool), fixed (bool), autofixing (bool), fixedMsg (str))) 223 found violation of style (lineno, position, text, ignored, fixed,
224 autofixing, fixedMsg))
225 </dd>
226 </dl><dl>
227 <dt>Return Type:</dt>
228 <dd>
229 tuple of (dict, list of tuples of (int, int, str, bool, bool, bool,
230 str))
219 </dd> 231 </dd>
220 </dl> 232 </dl>
221 <div align="right"><a href="#top">Up</a></div> 233 <div align="right"><a href="#top">Up</a></div>
222 <hr /><hr /> 234 <hr /><hr />
223 <a NAME="extractLineFlags" ID="extractLineFlags"></a> 235 <a NAME="extractLineFlags" ID="extractLineFlags"></a>

eric ide

mercurial