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,423 @@
|
|
|
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::Linter
|
|
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::Linter";
|
|
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 (L)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../Yamlint.html" title="Yamlint (module)">Yamlint</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">Linter</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::Linter
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName">Object</span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">Yamlint::Linter</li>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
81
|
+
|
|
82
|
+
</dd>
|
|
83
|
+
</dl>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<dl>
|
|
96
|
+
<dt>Defined in:</dt>
|
|
97
|
+
<dd>lib/yamlint/linter.rb</dd>
|
|
98
|
+
</dl>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
107
|
+
<ul class="summary">
|
|
108
|
+
|
|
109
|
+
<li class="public ">
|
|
110
|
+
<span class="summary_signature">
|
|
111
|
+
|
|
112
|
+
<a href="#config-instance_method" title="#config (instance method)">#<strong>config</strong> ⇒ Object </a>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</span>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
<span class="note title readonly">readonly</span>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
|
132
|
+
<p>Returns the value of attribute config.</p>
|
|
133
|
+
</div></span>
|
|
134
|
+
|
|
135
|
+
</li>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
</ul>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
<h2>
|
|
145
|
+
Instance Method Summary
|
|
146
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
147
|
+
</h2>
|
|
148
|
+
|
|
149
|
+
<ul class="summary">
|
|
150
|
+
|
|
151
|
+
<li class="public ">
|
|
152
|
+
<span class="summary_signature">
|
|
153
|
+
|
|
154
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(config = nil) ⇒ Linter </a>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
</span>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<span class="note title constructor">constructor</span>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<span class="summary_desc"><div class='inline'>
|
|
171
|
+
<p>A new instance of Linter.</p>
|
|
172
|
+
</div></span>
|
|
173
|
+
|
|
174
|
+
</li>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<li class="public ">
|
|
178
|
+
<span class="summary_signature">
|
|
179
|
+
|
|
180
|
+
<a href="#lint-instance_method" title="#lint (instance method)">#<strong>lint</strong>(content, filepath: nil) ⇒ Object </a>
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
</span>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
195
|
+
|
|
196
|
+
</li>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
<li class="public ">
|
|
200
|
+
<span class="summary_signature">
|
|
201
|
+
|
|
202
|
+
<a href="#lint_file-instance_method" title="#lint_file (instance method)">#<strong>lint_file</strong>(filepath) ⇒ Object </a>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
</span>
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
217
|
+
|
|
218
|
+
</li>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
</ul>
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
<div id="constructor_details" class="method_details_list">
|
|
225
|
+
<h2>Constructor Details</h2>
|
|
226
|
+
|
|
227
|
+
<div class="method_details first">
|
|
228
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
229
|
+
|
|
230
|
+
#<strong>initialize</strong>(config = nil) ⇒ <tt><span class='object_link'><a href="" title="Yamlint::Linter (class)">Linter</a></span></tt>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
</h3><div class="docstring">
|
|
237
|
+
<div class="discussion">
|
|
238
|
+
|
|
239
|
+
<p>Returns a new instance of Linter.</p>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
<div class="tags">
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
</div><table class="source_code">
|
|
248
|
+
<tr>
|
|
249
|
+
<td>
|
|
250
|
+
<pre class="lines">
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
10
|
|
254
|
+
11
|
|
255
|
+
12</pre>
|
|
256
|
+
</td>
|
|
257
|
+
<td>
|
|
258
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/linter.rb', line 10</span>
|
|
259
|
+
|
|
260
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
261
|
+
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="Config.html" title="Yamlint::Config (class)">Config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_load_default'><span class='object_link'><a href="Config.html#load_default-class_method" title="Yamlint::Config.load_default (method)">load_default</a></span></span>
|
|
262
|
+
<span class='kw'>end</span></pre>
|
|
263
|
+
</td>
|
|
264
|
+
</tr>
|
|
265
|
+
</table>
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<div id="instance_attr_details" class="attr_details">
|
|
271
|
+
<h2>Instance Attribute Details</h2>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
<span id=""></span>
|
|
275
|
+
<div class="method_details first">
|
|
276
|
+
<h3 class="signature first" id="config-instance_method">
|
|
277
|
+
|
|
278
|
+
#<strong>config</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
</h3><div class="docstring">
|
|
285
|
+
<div class="discussion">
|
|
286
|
+
|
|
287
|
+
<p>Returns the value of attribute config.</p>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
<div class="tags">
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
</div><table class="source_code">
|
|
296
|
+
<tr>
|
|
297
|
+
<td>
|
|
298
|
+
<pre class="lines">
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
8
|
|
302
|
+
9
|
|
303
|
+
10</pre>
|
|
304
|
+
</td>
|
|
305
|
+
<td>
|
|
306
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/linter.rb', line 8</span>
|
|
307
|
+
|
|
308
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
|
|
309
|
+
<span class='ivar'>@config</span>
|
|
310
|
+
<span class='kw'>end</span></pre>
|
|
311
|
+
</td>
|
|
312
|
+
</tr>
|
|
313
|
+
</table>
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
<div id="instance_method_details" class="method_details_list">
|
|
320
|
+
<h2>Instance Method Details</h2>
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
<div class="method_details first">
|
|
324
|
+
<h3 class="signature first" id="lint-instance_method">
|
|
325
|
+
|
|
326
|
+
#<strong>lint</strong>(content, filepath: nil) ⇒ <tt>Object</tt>
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
</h3><table class="source_code">
|
|
333
|
+
<tr>
|
|
334
|
+
<td>
|
|
335
|
+
<pre class="lines">
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
14
|
|
339
|
+
15
|
|
340
|
+
16
|
|
341
|
+
17
|
|
342
|
+
18
|
|
343
|
+
19
|
|
344
|
+
20
|
|
345
|
+
21
|
|
346
|
+
22
|
|
347
|
+
23
|
|
348
|
+
24
|
|
349
|
+
25
|
|
350
|
+
26
|
|
351
|
+
27
|
|
352
|
+
28
|
|
353
|
+
29</pre>
|
|
354
|
+
</td>
|
|
355
|
+
<td>
|
|
356
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/linter.rb', line 14</span>
|
|
357
|
+
|
|
358
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_lint'>lint</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='label'>filepath:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
359
|
+
<span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='id identifier rubyid_build_context'>build_context</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_filepath'>filepath</span><span class='rparen'>)</span>
|
|
360
|
+
|
|
361
|
+
<span class='id identifier rubyid_syntax_problems'>syntax_problems</span> <span class='op'>=</span> <span class='id identifier rubyid_check_syntax'>check_syntax</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_filepath'>filepath</span><span class='rparen'>)</span>
|
|
362
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_syntax_problems'>syntax_problems</span> <span class='kw'>unless</span> <span class='id identifier rubyid_syntax_problems'>syntax_problems</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
|
363
|
+
|
|
364
|
+
<span class='id identifier rubyid_parse_content'>parse_content</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
|
365
|
+
|
|
366
|
+
<span class='id identifier rubyid_rules'>rules</span> <span class='op'>=</span> <span class='id identifier rubyid_build_rules'>build_rules</span>
|
|
367
|
+
<span class='id identifier rubyid_rules'>rules</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_rule'>rule</span><span class='op'>|</span>
|
|
368
|
+
<span class='id identifier rubyid_problems'>problems</span> <span class='op'>=</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_check'>check</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
|
369
|
+
<span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_problems'>problems</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_problems'>problems</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
370
|
+
<span class='kw'>end</span>
|
|
371
|
+
|
|
372
|
+
<span class='id identifier rubyid_filter_disabled_problems'>filter_disabled_problems</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
|
373
|
+
<span class='kw'>end</span></pre>
|
|
374
|
+
</td>
|
|
375
|
+
</tr>
|
|
376
|
+
</table>
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
<div class="method_details ">
|
|
380
|
+
<h3 class="signature " id="lint_file-instance_method">
|
|
381
|
+
|
|
382
|
+
#<strong>lint_file</strong>(filepath) ⇒ <tt>Object</tt>
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
</h3><table class="source_code">
|
|
389
|
+
<tr>
|
|
390
|
+
<td>
|
|
391
|
+
<pre class="lines">
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
31
|
|
395
|
+
32
|
|
396
|
+
33
|
|
397
|
+
34</pre>
|
|
398
|
+
</td>
|
|
399
|
+
<td>
|
|
400
|
+
<pre class="code"><span class="info file"># File 'lib/yamlint/linter.rb', line 31</span>
|
|
401
|
+
|
|
402
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_lint_file'>lint_file</span><span class='lparen'>(</span><span class='id identifier rubyid_filepath'>filepath</span><span class='rparen'>)</span>
|
|
403
|
+
<span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_filepath'>filepath</span><span class='rparen'>)</span>
|
|
404
|
+
<span class='id identifier rubyid_lint'>lint</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='label'>filepath:</span><span class='rparen'>)</span>
|
|
405
|
+
<span class='kw'>end</span></pre>
|
|
406
|
+
</td>
|
|
407
|
+
</tr>
|
|
408
|
+
</table>
|
|
409
|
+
</div>
|
|
410
|
+
|
|
411
|
+
</div>
|
|
412
|
+
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
<div id="footer">
|
|
416
|
+
Generated on Sun Jan 25 08:00:08 2026 by
|
|
417
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
418
|
+
0.9.38 (ruby-4.0.0).
|
|
419
|
+
</div>
|
|
420
|
+
|
|
421
|
+
</div>
|
|
422
|
+
</body>
|
|
423
|
+
</html>
|