|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.CheckerPlugins.SyntaxChecker.jsonCheckSyntax</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.SyntaxChecker.jsonCheckSyntax</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the syntax check for JSON. |
|
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 <tr><td>None</td></tr> |
|
23 </table> |
|
24 <h3>Functions</h3> |
|
25 |
|
26 <table> |
|
27 |
|
28 <tr> |
|
29 <td><a href="#__jsonSyntaxCheck">__jsonSyntaxCheck</a></td> |
|
30 <td>Function to check a YAML source file for syntax errors.</td> |
|
31 </tr> |
|
32 <tr> |
|
33 <td><a href="#initBatchService">initBatchService</a></td> |
|
34 <td>Initialize the batch service and return the entry point.</td> |
|
35 </tr> |
|
36 <tr> |
|
37 <td><a href="#initService">initService</a></td> |
|
38 <td>Initialize the service and return the entry point.</td> |
|
39 </tr> |
|
40 <tr> |
|
41 <td><a href="#jsonSyntaxBatchCheck">jsonSyntaxBatchCheck</a></td> |
|
42 <td>Module function to check syntax for a batch of files.</td> |
|
43 </tr> |
|
44 <tr> |
|
45 <td><a href="#jsonSyntaxCheck">jsonSyntaxCheck</a></td> |
|
46 <td>Function to check a JSON source file for syntax errors.</td> |
|
47 </tr> |
|
48 <tr> |
|
49 <td><a href="#normalizeCode">normalizeCode</a></td> |
|
50 <td>Function to normalize the given code.</td> |
|
51 </tr> |
|
52 <tr> |
|
53 <td><a href="#workerTask">workerTask</a></td> |
|
54 <td>Module function acting as the parallel worker for the syntax check.</td> |
|
55 </tr> |
|
56 </table> |
|
57 <hr /> |
|
58 <hr /> |
|
59 <a NAME="__jsonSyntaxCheck" ID="__jsonSyntaxCheck"></a> |
|
60 <h2>__jsonSyntaxCheck</h2> |
|
61 <b>__jsonSyntaxCheck</b>(<i>file, codestring</i>) |
|
62 |
|
63 <p> |
|
64 Function to check a YAML source file for syntax errors. |
|
65 </p> |
|
66 <dl> |
|
67 |
|
68 <dt><i>file</i> (str)</dt> |
|
69 <dd> |
|
70 source filename |
|
71 </dd> |
|
72 <dt><i>codestring</i> (str)</dt> |
|
73 <dd> |
|
74 string containing the code to check |
|
75 </dd> |
|
76 </dl> |
|
77 <dl> |
|
78 <dt>Return:</dt> |
|
79 <dd> |
|
80 dictionary with the keys 'error' and 'warnings' which |
|
81 hold a list containing details about the error/ warnings |
|
82 (file name, line number, column, codestring (only at syntax |
|
83 errors), the message, a list with arguments for the message) |
|
84 </dd> |
|
85 </dl> |
|
86 <dl> |
|
87 <dt>Return Type:</dt> |
|
88 <dd> |
|
89 dict |
|
90 </dd> |
|
91 </dl> |
|
92 <div align="right"><a href="#top">Up</a></div> |
|
93 <hr /> |
|
94 <hr /> |
|
95 <a NAME="initBatchService" ID="initBatchService"></a> |
|
96 <h2>initBatchService</h2> |
|
97 <b>initBatchService</b>(<i></i>) |
|
98 |
|
99 <p> |
|
100 Initialize the batch service and return the entry point. |
|
101 </p> |
|
102 <dl> |
|
103 <dt>Return:</dt> |
|
104 <dd> |
|
105 the entry point for the background client |
|
106 </dd> |
|
107 </dl> |
|
108 <dl> |
|
109 <dt>Return Type:</dt> |
|
110 <dd> |
|
111 func |
|
112 </dd> |
|
113 </dl> |
|
114 <div align="right"><a href="#top">Up</a></div> |
|
115 <hr /> |
|
116 <hr /> |
|
117 <a NAME="initService" ID="initService"></a> |
|
118 <h2>initService</h2> |
|
119 <b>initService</b>(<i></i>) |
|
120 |
|
121 <p> |
|
122 Initialize the service and return the entry point. |
|
123 </p> |
|
124 <dl> |
|
125 <dt>Return:</dt> |
|
126 <dd> |
|
127 the entry point for the background client |
|
128 </dd> |
|
129 </dl> |
|
130 <dl> |
|
131 <dt>Return Type:</dt> |
|
132 <dd> |
|
133 func |
|
134 </dd> |
|
135 </dl> |
|
136 <div align="right"><a href="#top">Up</a></div> |
|
137 <hr /> |
|
138 <hr /> |
|
139 <a NAME="jsonSyntaxBatchCheck" ID="jsonSyntaxBatchCheck"></a> |
|
140 <h2>jsonSyntaxBatchCheck</h2> |
|
141 <b>jsonSyntaxBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) |
|
142 |
|
143 <p> |
|
144 Module function to check syntax for a batch of files. |
|
145 </p> |
|
146 <dl> |
|
147 |
|
148 <dt><i>argumentsList</i> (list)</dt> |
|
149 <dd> |
|
150 list of arguments tuples as given for yamlSyntaxCheck |
|
151 </dd> |
|
152 <dt><i>send</i> (func)</dt> |
|
153 <dd> |
|
154 reference to send function |
|
155 </dd> |
|
156 <dt><i>fx</i> (str)</dt> |
|
157 <dd> |
|
158 registered service name |
|
159 </dd> |
|
160 <dt><i>cancelled</i> (func)</dt> |
|
161 <dd> |
|
162 reference to function checking for a cancellation |
|
163 </dd> |
|
164 <dt><i>maxProcesses</i> (int)</dt> |
|
165 <dd> |
|
166 number of processes to be used |
|
167 </dd> |
|
168 </dl> |
|
169 <div align="right"><a href="#top">Up</a></div> |
|
170 <hr /> |
|
171 <hr /> |
|
172 <a NAME="jsonSyntaxCheck" ID="jsonSyntaxCheck"></a> |
|
173 <h2>jsonSyntaxCheck</h2> |
|
174 <b>jsonSyntaxCheck</b>(<i>file, codestring</i>) |
|
175 |
|
176 <p> |
|
177 Function to check a JSON source file for syntax errors. |
|
178 </p> |
|
179 <dl> |
|
180 |
|
181 <dt><i>file</i> (str)</dt> |
|
182 <dd> |
|
183 source filename |
|
184 </dd> |
|
185 <dt><i>codestring</i> (str)</dt> |
|
186 <dd> |
|
187 string containing the code to check |
|
188 </dd> |
|
189 </dl> |
|
190 <dl> |
|
191 <dt>Return:</dt> |
|
192 <dd> |
|
193 dictionary with the keys 'error' and 'warnings' which |
|
194 hold a list containing details about the error/ warnings |
|
195 (file name, line number, column, codestring (only at syntax |
|
196 errors), the message, a list with arguments for the message) |
|
197 </dd> |
|
198 </dl> |
|
199 <dl> |
|
200 <dt>Return Type:</dt> |
|
201 <dd> |
|
202 dict |
|
203 </dd> |
|
204 </dl> |
|
205 <div align="right"><a href="#top">Up</a></div> |
|
206 <hr /> |
|
207 <hr /> |
|
208 <a NAME="normalizeCode" ID="normalizeCode"></a> |
|
209 <h2>normalizeCode</h2> |
|
210 <b>normalizeCode</b>(<i>codestring</i>) |
|
211 |
|
212 <p> |
|
213 Function to normalize the given code. |
|
214 </p> |
|
215 <dl> |
|
216 |
|
217 <dt><i>codestring</i> (str)</dt> |
|
218 <dd> |
|
219 code to be normalized |
|
220 </dd> |
|
221 </dl> |
|
222 <dl> |
|
223 <dt>Return:</dt> |
|
224 <dd> |
|
225 normalized code |
|
226 </dd> |
|
227 </dl> |
|
228 <dl> |
|
229 <dt>Return Type:</dt> |
|
230 <dd> |
|
231 str |
|
232 </dd> |
|
233 </dl> |
|
234 <div align="right"><a href="#top">Up</a></div> |
|
235 <hr /> |
|
236 <hr /> |
|
237 <a NAME="workerTask" ID="workerTask"></a> |
|
238 <h2>workerTask</h2> |
|
239 <b>workerTask</b>(<i>inputQueue, outputQueue</i>) |
|
240 |
|
241 <p> |
|
242 Module function acting as the parallel worker for the syntax check. |
|
243 </p> |
|
244 <dl> |
|
245 |
|
246 <dt><i>inputQueue</i> (multiprocessing.Queue)</dt> |
|
247 <dd> |
|
248 input queue |
|
249 </dd> |
|
250 <dt><i>outputQueue</i> (multiprocessing.Queue)</dt> |
|
251 <dd> |
|
252 output queue |
|
253 </dd> |
|
254 </dl> |
|
255 <div align="right"><a href="#top">Up</a></div> |
|
256 <hr /> |
|
257 </body></html> |