64 <td>Private method to check the complexity of a single line of code and the median line complexity of the source code.</td> |
65 <td>Private method to check the complexity of a single line of code and the median line complexity of the source code.</td> |
65 </tr> |
66 </tr> |
66 <tr> |
67 <tr> |
67 <td><a href="#ComplexityChecker.__checkMcCabeComplexity">__checkMcCabeComplexity</a></td> |
68 <td><a href="#ComplexityChecker.__checkMcCabeComplexity">__checkMcCabeComplexity</a></td> |
68 <td>Private method to check the McCabe code complexity.</td> |
69 <td>Private method to check the McCabe code complexity.</td> |
69 </tr> |
|
70 <tr> |
|
71 <td><a href="#ComplexityChecker.__error">__error</a></td> |
|
72 <td>Private method to record an issue.</td> |
|
73 </tr> |
|
74 <tr> |
|
75 <td><a href="#ComplexityChecker.__ignoreCode">__ignoreCode</a></td> |
|
76 <td>Private method to check if the message code should be ignored.</td> |
|
77 </tr> |
|
78 <tr> |
|
79 <td><a href="#ComplexityChecker.run">run</a></td> |
|
80 <td>Public method to check the given source for code complexity.</td> |
|
81 </tr> |
70 </tr> |
82 </table> |
71 </table> |
83 |
72 |
84 <h3>Static Methods</h3> |
73 <h3>Static Methods</h3> |
85 <table> |
74 <table> |
138 <b>__checkMcCabeComplexity</b>(<i></i>) |
127 <b>__checkMcCabeComplexity</b>(<i></i>) |
139 <p> |
128 <p> |
140 Private method to check the McCabe code complexity. |
129 Private method to check the McCabe code complexity. |
141 </p> |
130 </p> |
142 |
131 |
143 <a NAME="ComplexityChecker.__error" ID="ComplexityChecker.__error"></a> |
|
144 <h4>ComplexityChecker.__error</h4> |
|
145 <b>__error</b>(<i>lineNumber, offset, code, *args</i>) |
|
146 <p> |
|
147 Private method to record an issue. |
|
148 </p> |
|
149 |
|
150 <dl> |
|
151 |
|
152 <dt><i>lineNumber</i> (int)</dt> |
|
153 <dd> |
|
154 line number of the issue |
|
155 </dd> |
|
156 <dt><i>offset</i> (int)</dt> |
|
157 <dd> |
|
158 position within line of the issue |
|
159 </dd> |
|
160 <dt><i>code</i> (str)</dt> |
|
161 <dd> |
|
162 message code |
|
163 </dd> |
|
164 <dt><i>args</i> (list)</dt> |
|
165 <dd> |
|
166 arguments for the message |
|
167 </dd> |
|
168 </dl> |
|
169 <a NAME="ComplexityChecker.__ignoreCode" ID="ComplexityChecker.__ignoreCode"></a> |
|
170 <h4>ComplexityChecker.__ignoreCode</h4> |
|
171 <b>__ignoreCode</b>(<i>code</i>) |
|
172 <p> |
|
173 Private method to check if the message code should be ignored. |
|
174 </p> |
|
175 |
|
176 <dl> |
|
177 |
|
178 <dt><i>code</i> (str)</dt> |
|
179 <dd> |
|
180 message code to check for |
|
181 </dd> |
|
182 </dl> |
|
183 <dl> |
|
184 <dt>Return:</dt> |
|
185 <dd> |
|
186 flag indicating to ignore the given code |
|
187 </dd> |
|
188 </dl> |
|
189 <dl> |
|
190 <dt>Return Type:</dt> |
|
191 <dd> |
|
192 bool |
|
193 </dd> |
|
194 </dl> |
|
195 <a NAME="ComplexityChecker.run" ID="ComplexityChecker.run"></a> |
|
196 <h4>ComplexityChecker.run</h4> |
|
197 <b>run</b>(<i></i>) |
|
198 <p> |
|
199 Public method to check the given source for code complexity. |
|
200 </p> |
|
201 |
|
202 <div align="right"><a href="#top">Up</a></div> |
132 <div align="right"><a href="#top">Up</a></div> |
203 <hr /> |
133 <hr /> |
204 <hr /> |
134 <hr /> |
205 <a NAME="LineComplexityVisitor" ID="LineComplexityVisitor"></a> |
135 <a NAME="LineComplexityVisitor" ID="LineComplexityVisitor"></a> |
206 <h2>LineComplexityVisitor</h2> |
136 <h2>LineComplexityVisitor</h2> |