yamlint 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +31 -9
- data/.serena/.gitignore +1 -0
- data/.serena/memories/project_overview.md +25 -0
- data/.serena/memories/style_and_conventions.md +7 -0
- data/.serena/memories/suggested_commands.md +17 -0
- data/.serena/memories/task_completion.md +5 -0
- data/.serena/project.yml +89 -0
- data/CHANGELOG.md +6 -2
- data/Gemfile +9 -7
- data/LICENSE.txt +1 -1
- data/README.md +155 -17
- data/Rakefile +10 -3
- data/docs/Yamlint/Cli.html +403 -0
- data/docs/Yamlint/Config.html +1034 -0
- data/docs/Yamlint/Formatter.html +433 -0
- data/docs/Yamlint/Linter.html +423 -0
- data/docs/Yamlint/Models/LintContext.html +993 -0
- data/docs/Yamlint/Models/Problem.html +951 -0
- data/docs/Yamlint/Models/Token.html +713 -0
- data/docs/Yamlint/Models.html +117 -0
- data/docs/Yamlint/Output/Base.html +290 -0
- data/docs/Yamlint/Output/Colored.html +293 -0
- data/docs/Yamlint/Output/Github.html +260 -0
- data/docs/Yamlint/Output/Parsable.html +258 -0
- data/docs/Yamlint/Output/Standard.html +270 -0
- data/docs/Yamlint/Output.html +208 -0
- data/docs/Yamlint/Parser/Comment.html +795 -0
- data/docs/Yamlint/Parser/CommentExtractor.html +287 -0
- data/docs/Yamlint/Parser/LineParser.html +423 -0
- data/docs/Yamlint/Parser/TokenParser/Handler.html +910 -0
- data/docs/Yamlint/Parser/TokenParser.html +291 -0
- data/docs/Yamlint/Parser.html +117 -0
- data/docs/Yamlint/Presets.html +266 -0
- data/docs/Yamlint/Rules/Anchors/AnchorHandler.html +678 -0
- data/docs/Yamlint/Rules/Anchors.html +314 -0
- data/docs/Yamlint/Rules/Base.html +968 -0
- data/docs/Yamlint/Rules/Braces.html +335 -0
- data/docs/Yamlint/Rules/Brackets.html +335 -0
- data/docs/Yamlint/Rules/Colons.html +313 -0
- data/docs/Yamlint/Rules/Commas.html +313 -0
- data/docs/Yamlint/Rules/CommentRule.html +298 -0
- data/docs/Yamlint/Rules/Comments.html +317 -0
- data/docs/Yamlint/Rules/CommentsIndentation.html +328 -0
- data/docs/Yamlint/Rules/DocumentEnd.html +332 -0
- data/docs/Yamlint/Rules/DocumentStart.html +332 -0
- data/docs/Yamlint/Rules/EmptyLines.html +300 -0
- data/docs/Yamlint/Rules/EmptyValues.html +273 -0
- data/docs/Yamlint/Rules/FloatValues.html +383 -0
- data/docs/Yamlint/Rules/Hyphens.html +337 -0
- data/docs/Yamlint/Rules/Indentation.html +329 -0
- data/docs/Yamlint/Rules/KeyDuplicates/DuplicateKeyHandler.html +716 -0
- data/docs/Yamlint/Rules/KeyDuplicates.html +258 -0
- data/docs/Yamlint/Rules/KeyOrdering/KeyOrderHandler.html +694 -0
- data/docs/Yamlint/Rules/KeyOrdering.html +258 -0
- data/docs/Yamlint/Rules/LineLength.html +251 -0
- data/docs/Yamlint/Rules/LineRule.html +304 -0
- data/docs/Yamlint/Rules/NewLineAtEndOfFile.html +308 -0
- data/docs/Yamlint/Rules/NewLines.html +310 -0
- data/docs/Yamlint/Rules/OctalValues.html +270 -0
- data/docs/Yamlint/Rules/QuotedStrings.html +381 -0
- data/docs/Yamlint/Rules/Registry.html +492 -0
- data/docs/Yamlint/Rules/TokenRule.html +298 -0
- data/docs/Yamlint/Rules/TrailingSpaces.html +321 -0
- data/docs/Yamlint/Rules/Truthy.html +288 -0
- data/docs/Yamlint/Rules.html +190 -0
- data/docs/Yamlint/Runner.html +551 -0
- data/docs/Yamlint.html +135 -0
- data/docs/_index.html +643 -0
- data/docs/class_list.html +54 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +490 -0
- data/docs/file.README.html +276 -0
- data/docs/file_list.html +59 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +276 -0
- data/docs/js/app.js +395 -0
- data/docs/js/full_list.js +244 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +1582 -0
- data/docs/top-level-namespace.html +110 -0
- data/exe/yamlint +7 -0
- data/lib/yamlint/cli.rb +162 -0
- data/lib/yamlint/config.rb +113 -0
- data/lib/yamlint/formatter.rb +140 -0
- data/lib/yamlint/linter.rb +130 -0
- data/lib/yamlint/models/lint_context.rb +43 -0
- data/lib/yamlint/models/problem.rb +44 -0
- data/lib/yamlint/models/token.rb +22 -0
- data/lib/yamlint/models.rb +9 -0
- data/lib/yamlint/output/base.rb +15 -0
- data/lib/yamlint/output/colored.rb +54 -0
- data/lib/yamlint/output/github.rb +20 -0
- data/lib/yamlint/output/parsable.rb +19 -0
- data/lib/yamlint/output/standard.rb +25 -0
- data/lib/yamlint/output.rb +26 -0
- data/lib/yamlint/parser/comment_extractor.rb +78 -0
- data/lib/yamlint/parser/line_parser.rb +30 -0
- data/lib/yamlint/parser/token_parser.rb +92 -0
- data/lib/yamlint/parser.rb +10 -0
- data/lib/yamlint/presets/default.rb +35 -0
- data/lib/yamlint/presets/relaxed.rb +34 -0
- data/lib/yamlint/presets.rb +19 -0
- data/lib/yamlint/rules/anchors.rb +133 -0
- data/lib/yamlint/rules/base.rb +102 -0
- data/lib/yamlint/rules/braces.rb +105 -0
- data/lib/yamlint/rules/brackets.rb +105 -0
- data/lib/yamlint/rules/colons.rb +73 -0
- data/lib/yamlint/rules/commas.rb +85 -0
- data/lib/yamlint/rules/comments.rb +77 -0
- data/lib/yamlint/rules/comments_indentation.rb +66 -0
- data/lib/yamlint/rules/document_end.rb +45 -0
- data/lib/yamlint/rules/document_start.rb +45 -0
- data/lib/yamlint/rules/empty_lines.rb +107 -0
- data/lib/yamlint/rules/empty_values.rb +43 -0
- data/lib/yamlint/rules/float_values.rb +67 -0
- data/lib/yamlint/rules/hyphens.rb +42 -0
- data/lib/yamlint/rules/indentation.rb +39 -0
- data/lib/yamlint/rules/key_duplicates.rb +127 -0
- data/lib/yamlint/rules/key_ordering.rb +126 -0
- data/lib/yamlint/rules/line_length.rb +57 -0
- data/lib/yamlint/rules/new_line_at_end_of_file.rb +31 -0
- data/lib/yamlint/rules/new_lines.rb +59 -0
- data/lib/yamlint/rules/octal_values.rb +62 -0
- data/lib/yamlint/rules/quoted_strings.rb +73 -0
- data/lib/yamlint/rules/registry.rb +48 -0
- data/lib/yamlint/rules/trailing_spaces.rb +31 -0
- data/lib/yamlint/rules/truthy.rb +48 -0
- data/lib/yamlint/rules.rb +41 -0
- data/lib/yamlint/runner.rb +80 -0
- data/lib/yamlint/version.rb +1 -1
- data/lib/yamlint.rb +11 -3
- metadata +131 -11
- data/CODE_OF_CONDUCT.md +0 -84
- data/sig/yamlint.rbs +0 -4
|
@@ -0,0 +1,694 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Class: Yamlint::Rules::KeyOrdering::KeyOrderHandler
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.38
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Yamlint::Rules::KeyOrdering::KeyOrderHandler";
|
|
19
|
+
relpath = '../../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../../../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../../../_index.html">Index (K)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../Yamlint.html" title="Yamlint (module)">Yamlint</a></span></span> » <span class='title'><span class='object_link'><a href="../../Rules.html" title="Yamlint::Rules (module)">Rules</a></span></span> » <span class='title'><span class='object_link'><a href="../KeyOrdering.html" title="Yamlint::Rules::KeyOrdering (class)">KeyOrdering</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">KeyOrderHandler</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../../../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Class: Yamlint::Rules::KeyOrdering::KeyOrderHandler
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName">Psych::Handler</span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">Psych::Handler</li>
|
|
78
|
+
|
|
79
|
+
<li class="next">Yamlint::Rules::KeyOrdering::KeyOrderHandler</li>
|
|
80
|
+
|
|
81
|
+
</ul>
|
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
83
|
+
|
|
84
|
+
</dd>
|
|
85
|
+
</dl>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<dl>
|
|
98
|
+
<dt>Defined in:</dt>
|
|
99
|
+
<dd>lib/yamlint/rules/key_ordering.rb</dd>
|
|
100
|
+
</dl>
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
109
|
+
<ul class="summary">
|
|
110
|
+
|
|
111
|
+
<li class="public ">
|
|
112
|
+
<span class="summary_signature">
|
|
113
|
+
|
|
114
|
+
<a href="#parser-instance_method" title="#parser (instance method)">#<strong>parser</strong> ⇒ Object </a>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
</span>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
|
132
|
+
<p>Returns the value of attribute parser.</p>
|
|
133
|
+
</div></span>
|
|
134
|
+
|
|
135
|
+
</li>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<li class="public ">
|
|
139
|
+
<span class="summary_signature">
|
|
140
|
+
|
|
141
|
+
<a href="#problems-instance_method" title="#problems (instance method)">#<strong>problems</strong> ⇒ Object </a>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
</span>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<span class="note title readonly">readonly</span>
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
<span class="summary_desc"><div class='inline'>
|
|
161
|
+
<p>Returns the value of attribute problems.</p>
|
|
162
|
+
</div></span>
|
|
163
|
+
|
|
164
|
+
</li>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
</ul>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<h2>
|
|
174
|
+
Instance Method Summary
|
|
175
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
176
|
+
</h2>
|
|
177
|
+
|
|
178
|
+
<ul class="summary">
|
|
179
|
+
|
|
180
|
+
<li class="public ">
|
|
181
|
+
<span class="summary_signature">
|
|
182
|
+
|
|
183
|
+
<a href="#end_mapping-instance_method" title="#end_mapping (instance method)">#<strong>end_mapping</strong> ⇒ Object </a>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
</span>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
198
|
+
|
|
199
|
+
</li>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
<li class="public ">
|
|
203
|
+
<span class="summary_signature">
|
|
204
|
+
|
|
205
|
+
<a href="#end_sequence-instance_method" title="#end_sequence (instance method)">#<strong>end_sequence</strong> ⇒ Object </a>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
</span>
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
220
|
+
|
|
221
|
+
</li>
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
<li class="public ">
|
|
225
|
+
<span class="summary_signature">
|
|
226
|
+
|
|
227
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ KeyOrderHandler </a>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
</span>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<span class="note title constructor">constructor</span>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
<span class="summary_desc"><div class='inline'>
|
|
244
|
+
<p>A new instance of KeyOrderHandler.</p>
|
|
245
|
+
</div></span>
|
|
246
|
+
|
|
247
|
+
</li>
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<li class="public ">
|
|
251
|
+
<span class="summary_signature">
|
|
252
|
+
|
|
253
|
+
<a href="#scalar-instance_method" title="#scalar (instance method)">#<strong>scalar</strong>(value, _anchor, _tag, _plain, _quoted, _style) ⇒ Object </a>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
</span>
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
268
|
+
|
|
269
|
+
</li>
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
<li class="public ">
|
|
273
|
+
<span class="summary_signature">
|
|
274
|
+
|
|
275
|
+
<a href="#start_mapping-instance_method" title="#start_mapping (instance method)">#<strong>start_mapping</strong> ⇒ Object </a>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
</span>
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
290
|
+
|
|
291
|
+
</li>
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
<li class="public ">
|
|
295
|
+
<span class="summary_signature">
|
|
296
|
+
|
|
297
|
+
<a href="#start_sequence-instance_method" title="#start_sequence (instance method)">#<strong>start_sequence</strong> ⇒ Object </a>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
</span>
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
312
|
+
|
|
313
|
+
</li>
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
</ul>
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
<div id="constructor_details" class="method_details_list">
|
|
321
|
+
<h2>Constructor Details</h2>
|
|
322
|
+
|
|
323
|
+
<div class="method_details first">
|
|
324
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
325
|
+
|
|
326
|
+
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Yamlint::Rules::KeyOrdering::KeyOrderHandler (class)">KeyOrderHandler</a></span></tt>
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
</h3><div class="docstring">
|
|
333
|
+
<div class="discussion">
|
|
334
|
+
|
|
335
|
+
<p>Returns a new instance of KeyOrderHandler.</p>
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
<div class="tags">
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
</div><table class="source_code">
|
|
344
|
+
<tr>
|
|
345
|
+
<td>
|
|
346
|
+
<pre class="lines">
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
37
|
|
350
|
+
38
|
|
351
|
+
39
|
|
352
|
+
40
|
|
353
|
+
41
|
|
354
|
+
42</pre>
|
|
355
|
+
</td>
|
|
356
|
+
<td>
|
|
357
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 37</span>
|
|
358
|
+
|
|
359
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
|
360
|
+
<span class='kw'>super</span>
|
|
361
|
+
<span class='ivar'>@stack</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
362
|
+
<span class='ivar'>@problems</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
363
|
+
<span class='ivar'>@parser</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
|
364
|
+
<span class='kw'>end</span></pre>
|
|
365
|
+
</td>
|
|
366
|
+
</tr>
|
|
367
|
+
</table>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<div id="instance_attr_details" class="attr_details">
|
|
373
|
+
<h2>Instance Attribute Details</h2>
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
<span id="parser=-instance_method"></span>
|
|
377
|
+
<div class="method_details first">
|
|
378
|
+
<h3 class="signature first" id="parser-instance_method">
|
|
379
|
+
|
|
380
|
+
#<strong>parser</strong> ⇒ <tt>Object</tt>
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
</h3><div class="docstring">
|
|
387
|
+
<div class="discussion">
|
|
388
|
+
|
|
389
|
+
<p>Returns the value of attribute parser.</p>
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
<div class="tags">
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
</div><table class="source_code">
|
|
398
|
+
<tr>
|
|
399
|
+
<td>
|
|
400
|
+
<pre class="lines">
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
35
|
|
404
|
+
36
|
|
405
|
+
37</pre>
|
|
406
|
+
</td>
|
|
407
|
+
<td>
|
|
408
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 35</span>
|
|
409
|
+
|
|
410
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parser'>parser</span>
|
|
411
|
+
<span class='ivar'>@parser</span>
|
|
412
|
+
<span class='kw'>end</span></pre>
|
|
413
|
+
</td>
|
|
414
|
+
</tr>
|
|
415
|
+
</table>
|
|
416
|
+
</div>
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<span id=""></span>
|
|
420
|
+
<div class="method_details ">
|
|
421
|
+
<h3 class="signature " id="problems-instance_method">
|
|
422
|
+
|
|
423
|
+
#<strong>problems</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
</h3><div class="docstring">
|
|
430
|
+
<div class="discussion">
|
|
431
|
+
|
|
432
|
+
<p>Returns the value of attribute problems.</p>
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
<div class="tags">
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
</div><table class="source_code">
|
|
441
|
+
<tr>
|
|
442
|
+
<td>
|
|
443
|
+
<pre class="lines">
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
34
|
|
447
|
+
35
|
|
448
|
+
36</pre>
|
|
449
|
+
</td>
|
|
450
|
+
<td>
|
|
451
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 34</span>
|
|
452
|
+
|
|
453
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_problems'>problems</span>
|
|
454
|
+
<span class='ivar'>@problems</span>
|
|
455
|
+
<span class='kw'>end</span></pre>
|
|
456
|
+
</td>
|
|
457
|
+
</tr>
|
|
458
|
+
</table>
|
|
459
|
+
</div>
|
|
460
|
+
|
|
461
|
+
</div>
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
<div id="instance_method_details" class="method_details_list">
|
|
465
|
+
<h2>Instance Method Details</h2>
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
<div class="method_details first">
|
|
469
|
+
<h3 class="signature first" id="end_mapping-instance_method">
|
|
470
|
+
|
|
471
|
+
#<strong>end_mapping</strong> ⇒ <tt>Object</tt>
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
</h3><table class="source_code">
|
|
478
|
+
<tr>
|
|
479
|
+
<td>
|
|
480
|
+
<pre class="lines">
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
54
|
|
484
|
+
55
|
|
485
|
+
56
|
|
486
|
+
57</pre>
|
|
487
|
+
</td>
|
|
488
|
+
<td>
|
|
489
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 54</span>
|
|
490
|
+
|
|
491
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_end_mapping'>end_mapping</span>
|
|
492
|
+
<span class='id identifier rubyid_frame'>frame</span> <span class='op'>=</span> <span class='ivar'>@stack</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span>
|
|
493
|
+
<span class='id identifier rubyid_close_parent_value'>close_parent_value</span><span class='lparen'>(</span><span class='id identifier rubyid_frame'>frame</span><span class='rparen'>)</span>
|
|
494
|
+
<span class='kw'>end</span></pre>
|
|
495
|
+
</td>
|
|
496
|
+
</tr>
|
|
497
|
+
</table>
|
|
498
|
+
</div>
|
|
499
|
+
|
|
500
|
+
<div class="method_details ">
|
|
501
|
+
<h3 class="signature " id="end_sequence-instance_method">
|
|
502
|
+
|
|
503
|
+
#<strong>end_sequence</strong> ⇒ <tt>Object</tt>
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
</h3><table class="source_code">
|
|
510
|
+
<tr>
|
|
511
|
+
<td>
|
|
512
|
+
<pre class="lines">
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
67
|
|
516
|
+
68
|
|
517
|
+
69
|
|
518
|
+
70</pre>
|
|
519
|
+
</td>
|
|
520
|
+
<td>
|
|
521
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 67</span>
|
|
522
|
+
|
|
523
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_end_sequence'>end_sequence</span>
|
|
524
|
+
<span class='id identifier rubyid_frame'>frame</span> <span class='op'>=</span> <span class='ivar'>@stack</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span>
|
|
525
|
+
<span class='id identifier rubyid_close_parent_value'>close_parent_value</span><span class='lparen'>(</span><span class='id identifier rubyid_frame'>frame</span><span class='rparen'>)</span>
|
|
526
|
+
<span class='kw'>end</span></pre>
|
|
527
|
+
</td>
|
|
528
|
+
</tr>
|
|
529
|
+
</table>
|
|
530
|
+
</div>
|
|
531
|
+
|
|
532
|
+
<div class="method_details ">
|
|
533
|
+
<h3 class="signature " id="scalar-instance_method">
|
|
534
|
+
|
|
535
|
+
#<strong>scalar</strong>(value, _anchor, _tag, _plain, _quoted, _style) ⇒ <tt>Object</tt>
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
</h3><table class="source_code">
|
|
542
|
+
<tr>
|
|
543
|
+
<td>
|
|
544
|
+
<pre class="lines">
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
72
|
|
548
|
+
73
|
|
549
|
+
74
|
|
550
|
+
75
|
|
551
|
+
76
|
|
552
|
+
77
|
|
553
|
+
78
|
|
554
|
+
79
|
|
555
|
+
80
|
|
556
|
+
81
|
|
557
|
+
82
|
|
558
|
+
83
|
|
559
|
+
84
|
|
560
|
+
85
|
|
561
|
+
86
|
|
562
|
+
87
|
|
563
|
+
88
|
|
564
|
+
89
|
|
565
|
+
90
|
|
566
|
+
91
|
|
567
|
+
92
|
|
568
|
+
93
|
|
569
|
+
94</pre>
|
|
570
|
+
</td>
|
|
571
|
+
<td>
|
|
572
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 72</span>
|
|
573
|
+
|
|
574
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_scalar'>scalar</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid__anchor'>_anchor</span><span class='comma'>,</span> <span class='id identifier rubyid__tag'>_tag</span><span class='comma'>,</span> <span class='id identifier rubyid__plain'>_plain</span><span class='comma'>,</span> <span class='id identifier rubyid__quoted'>_quoted</span><span class='comma'>,</span> <span class='id identifier rubyid__style'>_style</span><span class='rparen'>)</span>
|
|
575
|
+
<span class='id identifier rubyid_frame'>frame</span> <span class='op'>=</span> <span class='ivar'>@stack</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
|
576
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_frame'>frame</span> <span class='op'>&&</span> <span class='id identifier rubyid_frame'>frame</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:mapping</span>
|
|
577
|
+
|
|
578
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_frame'>frame</span><span class='lbracket'>[</span><span class='symbol'>:expecting_key</span><span class='rbracket'>]</span>
|
|
579
|
+
<span class='id identifier rubyid_current_keys'>current_keys</span> <span class='op'>=</span> <span class='id identifier rubyid_frame'>frame</span><span class='lbracket'>[</span><span class='symbol'>:keys</span><span class='rbracket'>]</span>
|
|
580
|
+
<span class='id identifier rubyid_mark'>mark</span> <span class='op'>=</span> <span class='ivar'>@parser</span><span class='op'>&.</span><span class='id identifier rubyid_mark'>mark</span>
|
|
581
|
+
|
|
582
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_current_keys'>current_keys</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='op'>&&</span> <span class='id identifier rubyid_value'>value</span> <span class='op'><</span> <span class='id identifier rubyid_current_keys'>current_keys</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
|
583
|
+
<span class='ivar'>@problems</span> <span class='op'><<</span> <span class='lbrace'>{</span>
|
|
584
|
+
<span class='label'>key:</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
|
|
585
|
+
<span class='label'>prev_key:</span> <span class='id identifier rubyid_current_keys'>current_keys</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='comma'>,</span>
|
|
586
|
+
<span class='label'>line:</span> <span class='id identifier rubyid_mark'>mark</span> <span class='op'>?</span> <span class='id identifier rubyid_mark'>mark</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span> <span class='op'>+</span> <span class='int'>1</span> <span class='op'>:</span> <span class='int'>1</span><span class='comma'>,</span>
|
|
587
|
+
<span class='label'>column:</span> <span class='id identifier rubyid_mark'>mark</span> <span class='op'>?</span> <span class='id identifier rubyid_mark'>mark</span><span class='period'>.</span><span class='id identifier rubyid_column'>column</span> <span class='op'>+</span> <span class='int'>1</span> <span class='op'>:</span> <span class='int'>1</span>
|
|
588
|
+
<span class='rbrace'>}</span>
|
|
589
|
+
<span class='kw'>end</span>
|
|
590
|
+
|
|
591
|
+
<span class='id identifier rubyid_current_keys'>current_keys</span> <span class='op'><<</span> <span class='id identifier rubyid_value'>value</span>
|
|
592
|
+
<span class='id identifier rubyid_frame'>frame</span><span class='lbracket'>[</span><span class='symbol'>:expecting_key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
593
|
+
<span class='kw'>else</span>
|
|
594
|
+
<span class='id identifier rubyid_frame'>frame</span><span class='lbracket'>[</span><span class='symbol'>:expecting_key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
595
|
+
<span class='kw'>end</span>
|
|
596
|
+
<span class='kw'>end</span></pre>
|
|
597
|
+
</td>
|
|
598
|
+
</tr>
|
|
599
|
+
</table>
|
|
600
|
+
</div>
|
|
601
|
+
|
|
602
|
+
<div class="method_details ">
|
|
603
|
+
<h3 class="signature " id="start_mapping-instance_method">
|
|
604
|
+
|
|
605
|
+
#<strong>start_mapping</strong> ⇒ <tt>Object</tt>
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
</h3><table class="source_code">
|
|
612
|
+
<tr>
|
|
613
|
+
<td>
|
|
614
|
+
<pre class="lines">
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
44
|
|
618
|
+
45
|
|
619
|
+
46
|
|
620
|
+
47
|
|
621
|
+
48
|
|
622
|
+
49
|
|
623
|
+
50
|
|
624
|
+
51
|
|
625
|
+
52</pre>
|
|
626
|
+
</td>
|
|
627
|
+
<td>
|
|
628
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 44</span>
|
|
629
|
+
|
|
630
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start_mapping'>start_mapping</span><span class='lparen'>(</span><span class='op'>*</span><span class='rparen'>)</span>
|
|
631
|
+
<span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='id identifier rubyid_current_mapping_frame'>current_mapping_frame</span>
|
|
632
|
+
<span class='ivar'>@stack</span> <span class='op'><<</span> <span class='lbrace'>{</span>
|
|
633
|
+
<span class='label'>type:</span> <span class='symbol'>:mapping</span><span class='comma'>,</span>
|
|
634
|
+
<span class='label'>keys:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
635
|
+
<span class='label'>expecting_key:</span> <span class='kw'>true</span><span class='comma'>,</span>
|
|
636
|
+
<span class='label'>close_parent:</span> <span class='id identifier rubyid_capture_close_parent'>capture_close_parent</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
|
|
637
|
+
<span class='rbrace'>}</span>
|
|
638
|
+
<span class='kw'>end</span></pre>
|
|
639
|
+
</td>
|
|
640
|
+
</tr>
|
|
641
|
+
</table>
|
|
642
|
+
</div>
|
|
643
|
+
|
|
644
|
+
<div class="method_details ">
|
|
645
|
+
<h3 class="signature " id="start_sequence-instance_method">
|
|
646
|
+
|
|
647
|
+
#<strong>start_sequence</strong> ⇒ <tt>Object</tt>
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
</h3><table class="source_code">
|
|
654
|
+
<tr>
|
|
655
|
+
<td>
|
|
656
|
+
<pre class="lines">
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
59
|
|
660
|
+
60
|
|
661
|
+
61
|
|
662
|
+
62
|
|
663
|
+
63
|
|
664
|
+
64
|
|
665
|
+
65</pre>
|
|
666
|
+
</td>
|
|
667
|
+
<td>
|
|
668
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/rules/key_ordering.rb', line 59</span>
|
|
669
|
+
|
|
670
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start_sequence'>start_sequence</span><span class='lparen'>(</span><span class='op'>*</span><span class='rparen'>)</span>
|
|
671
|
+
<span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='id identifier rubyid_current_mapping_frame'>current_mapping_frame</span>
|
|
672
|
+
<span class='ivar'>@stack</span> <span class='op'><<</span> <span class='lbrace'>{</span>
|
|
673
|
+
<span class='label'>type:</span> <span class='symbol'>:sequence</span><span class='comma'>,</span>
|
|
674
|
+
<span class='label'>close_parent:</span> <span class='id identifier rubyid_capture_close_parent'>capture_close_parent</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
|
|
675
|
+
<span class='rbrace'>}</span>
|
|
676
|
+
<span class='kw'>end</span></pre>
|
|
677
|
+
</td>
|
|
678
|
+
</tr>
|
|
679
|
+
</table>
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
</div>
|
|
683
|
+
|
|
684
|
+
</div>
|
|
685
|
+
|
|
686
|
+
<div id="footer">
|
|
687
|
+
Generated on Sun Jan 25 08:00:08 2026 by
|
|
688
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
689
|
+
0.9.38 (ruby-4.0.0).
|
|
690
|
+
</div>
|
|
691
|
+
|
|
692
|
+
</div>
|
|
693
|
+
</body>
|
|
694
|
+
</html>
|