src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Logging.LoggingChecker.html

branch
eric7
changeset 10368
8765229e7cc8
child 10479
856476537696
equal deleted inserted replaced
10367:b189ca1f5d53 10368:8765229e7cc8
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Logging.LoggingChecker</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Logging.LoggingChecker</h1>
10
11 <p>
12 Module implementing a checker for logging related issues.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#LoggingChecker">LoggingChecker</a></td>
25 <td>Class implementing a checker for logging related issues.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="LoggingChecker" ID="LoggingChecker"></a>
36 <h2>LoggingChecker</h2>
37
38 <p>
39 Class implementing a checker for logging related issues.
40 </p>
41 <h3>Derived from</h3>
42 None
43 <h3>Class Attributes</h3>
44
45 <table>
46 <tr><td>Codes</td></tr>
47 </table>
48 <h3>Class Methods</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Methods</h3>
54
55 <table>
56
57 <tr>
58 <td><a href="#LoggingChecker.__init__">LoggingChecker</a></td>
59 <td>Constructor</td>
60 </tr>
61 <tr>
62 <td><a href="#LoggingChecker.__checkLogging">__checkLogging</a></td>
63 <td>Private method to check logging statements.</td>
64 </tr>
65 <tr>
66 <td><a href="#LoggingChecker.__error">__error</a></td>
67 <td>Private method to record an issue.</td>
68 </tr>
69 <tr>
70 <td><a href="#LoggingChecker.__ignoreCode">__ignoreCode</a></td>
71 <td>Private method to check if the message code should be ignored.</td>
72 </tr>
73 <tr>
74 <td><a href="#LoggingChecker.run">run</a></td>
75 <td>Public method to check the given source against miscellaneous conditions.</td>
76 </tr>
77 </table>
78 <h3>Static Methods</h3>
79
80 <table>
81 <tr><td>None</td></tr>
82 </table>
83
84 <a NAME="LoggingChecker.__init__" ID="LoggingChecker.__init__"></a>
85 <h4>LoggingChecker (Constructor)</h4>
86 <b>LoggingChecker</b>(<i>source, filename, tree, select, ignore, expected, repeat, args</i>)
87
88 <p>
89 Constructor
90 </p>
91 <dl>
92
93 <dt><i>source</i> (list of str)</dt>
94 <dd>
95 source code to be checked
96 </dd>
97 <dt><i>filename</i> (str)</dt>
98 <dd>
99 name of the source file
100 </dd>
101 <dt><i>tree</i> (ast.Module)</dt>
102 <dd>
103 AST tree of the source code
104 </dd>
105 <dt><i>select</i> (list of str)</dt>
106 <dd>
107 list of selected codes
108 </dd>
109 <dt><i>ignore</i> (list of str)</dt>
110 <dd>
111 list of codes to be ignored
112 </dd>
113 <dt><i>expected</i> (list of str)</dt>
114 <dd>
115 list of expected codes
116 </dd>
117 <dt><i>repeat</i> (bool)</dt>
118 <dd>
119 flag indicating to report each occurrence of a code
120 </dd>
121 <dt><i>args</i> (dict)</dt>
122 <dd>
123 dictionary of arguments for the various checks
124 </dd>
125 </dl>
126 <a NAME="LoggingChecker.__checkLogging" ID="LoggingChecker.__checkLogging"></a>
127 <h4>LoggingChecker.__checkLogging</h4>
128 <b>__checkLogging</b>(<i></i>)
129
130 <p>
131 Private method to check logging statements.
132 </p>
133 <a NAME="LoggingChecker.__error" ID="LoggingChecker.__error"></a>
134 <h4>LoggingChecker.__error</h4>
135 <b>__error</b>(<i>lineNumber, offset, code, *args</i>)
136
137 <p>
138 Private method to record an issue.
139 </p>
140 <dl>
141
142 <dt><i>lineNumber</i> (int)</dt>
143 <dd>
144 line number of the issue
145 </dd>
146 <dt><i>offset</i> (int)</dt>
147 <dd>
148 position within line of the issue
149 </dd>
150 <dt><i>code</i> (str)</dt>
151 <dd>
152 message code
153 </dd>
154 <dt><i>args</i> (list)</dt>
155 <dd>
156 arguments for the message
157 </dd>
158 </dl>
159 <a NAME="LoggingChecker.__ignoreCode" ID="LoggingChecker.__ignoreCode"></a>
160 <h4>LoggingChecker.__ignoreCode</h4>
161 <b>__ignoreCode</b>(<i>code</i>)
162
163 <p>
164 Private method to check if the message code should be ignored.
165 </p>
166 <dl>
167
168 <dt><i>code</i> (str)</dt>
169 <dd>
170 message code to check for
171 </dd>
172 </dl>
173 <dl>
174 <dt>Return:</dt>
175 <dd>
176 flag indicating to ignore the given code
177 </dd>
178 </dl>
179 <dl>
180 <dt>Return Type:</dt>
181 <dd>
182 bool
183 </dd>
184 </dl>
185 <a NAME="LoggingChecker.run" ID="LoggingChecker.run"></a>
186 <h4>LoggingChecker.run</h4>
187 <b>run</b>(<i></i>)
188
189 <p>
190 Public method to check the given source against miscellaneous
191 conditions.
192 </p>
193 <div align="right"><a href="#top">Up</a></div>
194 <hr />
195 </body></html>

eric ide

mercurial