Documentation/Source/eric5.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleFixer.html

branch
BgService
changeset 3209
c5432abceb25
parent 2985
177b1858245f
child 3456
96232974dcdb
equal deleted inserted replaced
3177:5af61402d74d 3209:c5432abceb25
23 <p> 23 <p>
24 Module implementing a class to fix certain code style issues. 24 Module implementing a class to fix certain code style issues.
25 </p> 25 </p>
26 <h3>Global Attributes</h3> 26 <h3>Global Attributes</h3>
27 <table> 27 <table>
28 <tr><td>FixableCodeStyleIssues</td></tr> 28 <tr><td>FixableCodeStyleIssues</td></tr><tr><td>QT_TRANSLATE_NOOP</td></tr>
29 </table> 29 </table>
30 <h3>Classes</h3> 30 <h3>Classes</h3>
31 <table> 31 <table>
32 <tr> 32 <tr>
33 <td><a href="#CodeStyleFixer">CodeStyleFixer</a></td> 33 <td><a href="#CodeStyleFixer">CodeStyleFixer</a></td>
52 <h2>CodeStyleFixer</h2> 52 <h2>CodeStyleFixer</h2>
53 <p> 53 <p>
54 Class implementing a fixer for certain code style issues. 54 Class implementing a fixer for certain code style issues.
55 </p> 55 </p>
56 <h3>Derived from</h3> 56 <h3>Derived from</h3>
57 QObject 57 object
58 <h3>Class Attributes</h3> 58 <h3>Class Attributes</h3>
59 <table> 59 <table>
60 <tr><td>None</td></tr> 60 <tr><td>None</td></tr>
61 </table> 61 </table>
62 <h3>Class Methods</h3> 62 <h3>Class Methods</h3>
202 <td>Private method to fix the not equal notation.</td> 202 <td>Private method to fix the not equal notation.</td>
203 </tr><tr> 203 </tr><tr>
204 <td><a href="#CodeStyleFixer.__fixWhitespace">__fixWhitespace</a></td> 204 <td><a href="#CodeStyleFixer.__fixWhitespace">__fixWhitespace</a></td>
205 <td>Private method to correct whitespace at the given offset.</td> 205 <td>Private method to correct whitespace at the given offset.</td>
206 </tr><tr> 206 </tr><tr>
207 <td><a href="#CodeStyleFixer.__getEol">__getEol</a></td>
208 <td>Private method to get the applicable eol string.</td>
209 </tr><tr>
210 <td><a href="#CodeStyleFixer.__getID">__getID</a></td> 207 <td><a href="#CodeStyleFixer.__getID">__getID</a></td>
211 <td>Private method to get the ID for a deferred fix.</td> 208 <td>Private method to get the ID for a deferred fix.</td>
212 </tr><tr> 209 </tr><tr>
213 <td><a href="#CodeStyleFixer.__getIndent">__getIndent</a></td> 210 <td><a href="#CodeStyleFixer.__getIndent">__getIndent</a></td>
214 <td>Private method to get the indentation string.</td> 211 <td>Private method to get the indentation string.</td>
239 <table> 236 <table>
240 <tr><td>None</td></tr> 237 <tr><td>None</td></tr>
241 </table> 238 </table>
242 <a NAME="CodeStyleFixer.__init__" ID="CodeStyleFixer.__init__"></a> 239 <a NAME="CodeStyleFixer.__init__" ID="CodeStyleFixer.__init__"></a>
243 <h4>CodeStyleFixer (Constructor)</h4> 240 <h4>CodeStyleFixer (Constructor)</h4>
244 <b>CodeStyleFixer</b>(<i>project, filename, sourceLines, fixCodes, noFixCodes, maxLineLength, inPlace</i>) 241 <b>CodeStyleFixer</b>(<i>filename, sourceLines, fixCodes, noFixCodes, maxLineLength, inPlace, eol</i>)
245 <p> 242 <p>
246 Constructor 243 Constructor
247 </p><dl> 244 </p><dl>
248 <dt><i>project</i></dt> 245 <dt><i>filename</i></dt>
249 <dd>
250 reference to the project object (Project)
251 </dd><dt><i>filename</i></dt>
252 <dd> 246 <dd>
253 name of the file to be fixed (string) 247 name of the file to be fixed (string)
254 </dd><dt><i>sourceLines</i></dt> 248 </dd><dt><i>sourceLines</i></dt>
255 <dd> 249 <dd>
256 list of source lines including eol marker 250 list of source lines including eol marker
267 <dd> 261 <dd>
268 maximum allowed line length (integer) 262 maximum allowed line length (integer)
269 </dd><dt><i>inPlace</i></dt> 263 </dd><dt><i>inPlace</i></dt>
270 <dd> 264 <dd>
271 flag indicating to modify the file in place (boolean) 265 flag indicating to modify the file in place (boolean)
266 </dd><dt><i>eol</i></dt>
267 <dd>
268 end of line character(s) (string)
272 </dd> 269 </dd>
273 </dl><a NAME="CodeStyleFixer.__codeMatch" ID="CodeStyleFixer.__codeMatch"></a> 270 </dl><a NAME="CodeStyleFixer.__codeMatch" ID="CodeStyleFixer.__codeMatch"></a>
274 <h4>CodeStyleFixer.__codeMatch</h4> 271 <h4>CodeStyleFixer.__codeMatch</h4>
275 <b>__codeMatch</b>(<i>code</i>) 272 <b>__codeMatch</b>(<i>code</i>)
276 <p> 273 <p>
1485 </dd> 1482 </dd>
1486 </dl><dl> 1483 </dl><dl>
1487 <dt>Returns:</dt> 1484 <dt>Returns:</dt>
1488 <dd> 1485 <dd>
1489 corrected line 1486 corrected line
1490 </dd>
1491 </dl><a NAME="CodeStyleFixer.__getEol" ID="CodeStyleFixer.__getEol"></a>
1492 <h4>CodeStyleFixer.__getEol</h4>
1493 <b>__getEol</b>(<i></i>)
1494 <p>
1495 Private method to get the applicable eol string.
1496 </p><dl>
1497 <dt>Returns:</dt>
1498 <dd>
1499 eol string (string)
1500 </dd> 1487 </dd>
1501 </dl><a NAME="CodeStyleFixer.__getID" ID="CodeStyleFixer.__getID"></a> 1488 </dl><a NAME="CodeStyleFixer.__getID" ID="CodeStyleFixer.__getID"></a>
1502 <h4>CodeStyleFixer.__getID</h4> 1489 <h4>CodeStyleFixer.__getID</h4>
1503 <b>__getID</b>(<i></i>) 1490 <b>__getID</b>(<i></i>)
1504 <p> 1491 <p>

eric ide

mercurial