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