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,276 @@
|
|
|
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
|
+
File: README
|
|
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 = "README";
|
|
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="file_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</a> »
|
|
40
|
+
<span class="title">File: README</span>
|
|
41
|
+
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div id="search">
|
|
45
|
+
|
|
46
|
+
<a class="full_list_link" id="class_list_link"
|
|
47
|
+
href="class_list.html">
|
|
48
|
+
|
|
49
|
+
<svg width="24" height="24">
|
|
50
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
51
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
52
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
</svg>
|
|
54
|
+
</a>
|
|
55
|
+
|
|
56
|
+
</div>
|
|
57
|
+
<div class="clear"></div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div id="content"><div id='filecontents'><h1 align="center">yamlint</h1><p align="center">
|
|
61
|
+
<img src="https://img.shields.io/badge/ruby-%3E%3D%203.1-ruby.svg" alt="Ruby Version"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"><a href="https://github.com/ydah/yamlint/actions/workflows/test.yml"><img src="https://github.com/ydah/yamlint/actions/workflows/test.yml/badge.svg?branch=main" alt="test"></a><a href="https://badge.fury.io/rb/yamlint"><img src="https://badge.fury.io/rb/yamlint.svg" alt="Gem Version"></a>
|
|
62
|
+
</p><p align="center">
|
|
63
|
+
A Ruby CLI for linting and formatting YAML files
|
|
64
|
+
</p><p align="center">
|
|
65
|
+
<a href="#features">Features</a> •
|
|
66
|
+
<a href="#quickstart">Quickstart</a> •
|
|
67
|
+
<a href="#installation">Installation</a> •
|
|
68
|
+
<a href="#usage">Usage</a> •
|
|
69
|
+
<a href="#configuration">Configuration</a> •
|
|
70
|
+
<a href="#rules">Rules</a>
|
|
71
|
+
</p>
|
|
72
|
+
<h2 id="features">Features</h2>
|
|
73
|
+
<ul><li>
|
|
74
|
+
<p>Rule-based linting and auto-formatting</p>
|
|
75
|
+
</li><li>
|
|
76
|
+
<p>Configuration via <code>.yamllint(.yml/.yaml)</code> with preset <code>extends</code></p>
|
|
77
|
+
</li><li>
|
|
78
|
+
<p>CI-friendly output formats (standard/parsable/colored/github)</p>
|
|
79
|
+
</li><li>
|
|
80
|
+
<p>YAML file patterns and ignore support</p>
|
|
81
|
+
</li></ul>
|
|
82
|
+
|
|
83
|
+
<h2 id="quickstart">Quickstart</h2>
|
|
84
|
+
|
|
85
|
+
<pre class="code ruby"><code class="ruby">gem install yamlint
|
|
86
|
+
|
|
87
|
+
# lint
|
|
88
|
+
yamlint .
|
|
89
|
+
|
|
90
|
+
# format (dry-run)
|
|
91
|
+
yamlint format --dry-run .
|
|
92
|
+
</code></pre>
|
|
93
|
+
|
|
94
|
+
<h2 id="installation">Installation</h2>
|
|
95
|
+
|
|
96
|
+
<p>With Bundler:</p>
|
|
97
|
+
|
|
98
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_add'>add</span> <span class='id identifier rubyid_yamlint'>yamlint</span>
|
|
99
|
+
</code></pre>
|
|
100
|
+
|
|
101
|
+
<p>Without Bundler:</p>
|
|
102
|
+
|
|
103
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_yamlint'>yamlint</span>
|
|
104
|
+
</code></pre>
|
|
105
|
+
|
|
106
|
+
<h2 id="usage">Usage</h2>
|
|
107
|
+
|
|
108
|
+
<p>Basic:</p>
|
|
109
|
+
|
|
110
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_yamlint'>yamlint</span> <span class='period'>.</span>
|
|
111
|
+
<span class='id identifier rubyid_yamlint'>yamlint</span> <span class='id identifier rubyid_path'>path</span><span class='op'>/</span><span class='id identifier rubyid_to'>to</span><span class='op'>/</span><span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_yml'>yml</span>
|
|
112
|
+
</code></pre>
|
|
113
|
+
|
|
114
|
+
<p>Formatting:</p>
|
|
115
|
+
|
|
116
|
+
<pre class="code ruby"><code class="ruby">yamlint format .
|
|
117
|
+
yamlint format --dry-run .
|
|
118
|
+
</code></pre>
|
|
119
|
+
|
|
120
|
+
<p>CI output:</p>
|
|
121
|
+
|
|
122
|
+
<pre class="code ruby"><code class="ruby">yamlint -f github .
|
|
123
|
+
</code></pre>
|
|
124
|
+
|
|
125
|
+
<p>Help:</p>
|
|
126
|
+
|
|
127
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_yamlint'>yamlint</span> <span class='op'>-</span><span class='op'>-</span><span class='id identifier rubyid_help'>help</span>
|
|
128
|
+
</code></pre>
|
|
129
|
+
|
|
130
|
+
<h2 id="configuration">Configuration</h2>
|
|
131
|
+
|
|
132
|
+
<p>Default config file names:</p>
|
|
133
|
+
<ul><li>
|
|
134
|
+
<p><code>.yamllint</code></p>
|
|
135
|
+
</li><li>
|
|
136
|
+
<p><code>.yamllint.yml</code></p>
|
|
137
|
+
</li><li>
|
|
138
|
+
<p><code>.yamllint.yaml</code></p>
|
|
139
|
+
</li></ul>
|
|
140
|
+
|
|
141
|
+
<p>Configuration options:</p>
|
|
142
|
+
|
|
143
|
+
<table role="table">
|
|
144
|
+
<thead>
|
|
145
|
+
<tr>
|
|
146
|
+
<th>Option</th>
|
|
147
|
+
<th>Type</th>
|
|
148
|
+
<th>Default</th>
|
|
149
|
+
<th>Behavior</th>
|
|
150
|
+
</tr>
|
|
151
|
+
</thead>
|
|
152
|
+
<tbody>
|
|
153
|
+
<tr>
|
|
154
|
+
<td><code>extends</code></td>
|
|
155
|
+
<td>string</td>
|
|
156
|
+
<td>none</td>
|
|
157
|
+
<td>Inherit a preset (<code>default</code> or <code>relaxed</code>). Values from the current file override the preset.</td>
|
|
158
|
+
</tr>
|
|
159
|
+
<tr>
|
|
160
|
+
<td><code>yaml-files</code></td>
|
|
161
|
+
<td>list of glob strings</td>
|
|
162
|
+
<td><code>["*.yaml", "*.yml"]</code></td>
|
|
163
|
+
<td>Glob patterns used when discovering YAML files in directories.</td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td><code>ignore</code></td>
|
|
167
|
+
<td>list of strings</td>
|
|
168
|
+
<td><code>[]</code></td>
|
|
169
|
+
<td>List of paths to skip. Parsed by the config loader but not currently applied to file discovery.</td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td><code>rules</code></td>
|
|
173
|
+
<td>map</td>
|
|
174
|
+
<td><code>{}</code></td>
|
|
175
|
+
<td>Per-rule configuration. Set a rule to <code>disable</code> or <code>false</code> to turn it off, or provide a map of options.</td>
|
|
176
|
+
</tr>
|
|
177
|
+
</tbody>
|
|
178
|
+
</table>
|
|
179
|
+
|
|
180
|
+
<p>Notes:</p>
|
|
181
|
+
<ul><li>
|
|
182
|
+
<p>Rule option keys accept either <code>snake_case</code> or <code>kebab-case</code> and are normalized internally.</p>
|
|
183
|
+
</li><li>
|
|
184
|
+
<p>Rule option defaults come from the rule implementation and are merged with your overrides.</p>
|
|
185
|
+
</li></ul>
|
|
186
|
+
|
|
187
|
+
<p>Example:</p>
|
|
188
|
+
|
|
189
|
+
<pre class="code ruby"><code class="ruby">extends: default
|
|
190
|
+
|
|
191
|
+
yaml-files:
|
|
192
|
+
- "*.yml"
|
|
193
|
+
- "*.yaml"
|
|
194
|
+
|
|
195
|
+
ignore:
|
|
196
|
+
- vendor
|
|
197
|
+
- node_modules
|
|
198
|
+
|
|
199
|
+
rules:
|
|
200
|
+
line-length:
|
|
201
|
+
max: 120
|
|
202
|
+
document-start: disable
|
|
203
|
+
truthy:
|
|
204
|
+
allowed-values: ["true", "false"]
|
|
205
|
+
</code></pre>
|
|
206
|
+
|
|
207
|
+
<h2 id="presets">Presets</h2>
|
|
208
|
+
|
|
209
|
+
<p>Available presets:</p>
|
|
210
|
+
<ul><li>
|
|
211
|
+
<p><code>default</code></p>
|
|
212
|
+
</li><li>
|
|
213
|
+
<p><code>relaxed</code></p>
|
|
214
|
+
</li></ul>
|
|
215
|
+
|
|
216
|
+
<pre class="code ruby"><code class="ruby">extends: relaxed
|
|
217
|
+
</code></pre>
|
|
218
|
+
|
|
219
|
+
<h2 id="rules">Rules</h2>
|
|
220
|
+
|
|
221
|
+
<p>Key rules:</p>
|
|
222
|
+
<ul><li>
|
|
223
|
+
<p>anchors, braces, brackets, colons, commas, comments, comments-indentation</p>
|
|
224
|
+
</li><li>
|
|
225
|
+
<p>document-start, document-end, empty-lines, empty-values, float-values</p>
|
|
226
|
+
</li><li>
|
|
227
|
+
<p>hyphens, indentation, key-duplicates, key-ordering, line-length</p>
|
|
228
|
+
</li><li>
|
|
229
|
+
<p>new-lines, new-line-at-end-of-file, octal-values, quoted-strings</p>
|
|
230
|
+
</li><li>
|
|
231
|
+
<p>trailing-spaces, truthy</p>
|
|
232
|
+
</li></ul>
|
|
233
|
+
|
|
234
|
+
<h2 id="output-formats">Output formats</h2>
|
|
235
|
+
|
|
236
|
+
<p>Use <code>-f</code>/<code>--format</code> to select an output format:</p>
|
|
237
|
+
<ul><li>
|
|
238
|
+
<p><code>standard</code></p>
|
|
239
|
+
</li><li>
|
|
240
|
+
<p><code>parsable</code></p>
|
|
241
|
+
</li><li>
|
|
242
|
+
<p><code>colored</code></p>
|
|
243
|
+
</li><li>
|
|
244
|
+
<p><code>github</code></p>
|
|
245
|
+
</li></ul>
|
|
246
|
+
|
|
247
|
+
<h2 id="development">Development</h2>
|
|
248
|
+
|
|
249
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bin'>bin</span><span class='op'>/</span><span class='id identifier rubyid_setup'>setup</span>
|
|
250
|
+
<span class='id identifier rubyid_rake'>rake</span> <span class='id identifier rubyid_spec'>spec</span>
|
|
251
|
+
</code></pre>
|
|
252
|
+
|
|
253
|
+
<p>Install locally:</p>
|
|
254
|
+
|
|
255
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_exec'>exec</span> <span class='id identifier rubyid_rake'>rake</span> <span class='id identifier rubyid_install'>install</span>
|
|
256
|
+
</code></pre>
|
|
257
|
+
|
|
258
|
+
<p>Release:</p>
|
|
259
|
+
|
|
260
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_exec'>exec</span> <span class='id identifier rubyid_rake'>rake</span> <span class='id identifier rubyid_release'>release</span>
|
|
261
|
+
</code></pre>
|
|
262
|
+
|
|
263
|
+
<h2 id="license">License</h2>
|
|
264
|
+
|
|
265
|
+
<p>MIT License. See <code>LICENSE.txt</code> for details.</p>
|
|
266
|
+
</div></div>
|
|
267
|
+
|
|
268
|
+
<div id="footer">
|
|
269
|
+
Generated on Sun Jan 25 08:00:08 2026 by
|
|
270
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
271
|
+
0.9.38 (ruby-4.0.0).
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
</div>
|
|
275
|
+
</body>
|
|
276
|
+
</html>
|
data/docs/file_list.html
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html >
|
|
3
|
+
<head>
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
|
|
8
|
+
|
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
14
|
+
|
|
15
|
+
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<title>File List</title>
|
|
19
|
+
<base id="base_target" target="_parent" />
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<div id="content">
|
|
23
|
+
<div class="fixed_header">
|
|
24
|
+
<h1 id="full_list_header">File List</h1>
|
|
25
|
+
<div id="full_list_nav">
|
|
26
|
+
|
|
27
|
+
<span><a target="_self" href="class_list.html">
|
|
28
|
+
Classes
|
|
29
|
+
</a></span>
|
|
30
|
+
|
|
31
|
+
<span><a target="_self" href="method_list.html">
|
|
32
|
+
Methods
|
|
33
|
+
</a></span>
|
|
34
|
+
|
|
35
|
+
<span><a target="_self" href="file_list.html">
|
|
36
|
+
Files
|
|
37
|
+
</a></span>
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div id="search">
|
|
42
|
+
<label for="search-class">Search:</label>
|
|
43
|
+
<input id="search-class" type="text" />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<ul id="full_list" class="file">
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<li id="object_README" class="odd">
|
|
51
|
+
<div class="item"><span class="object_link"><a href="index.html" title="README">README</a></span></div>
|
|
52
|
+
</li>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</ul>
|
|
57
|
+
</div>
|
|
58
|
+
</body>
|
|
59
|
+
</html>
|
data/docs/frames.html
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Documentation by YARD 0.9.38</title>
|
|
6
|
+
</head>
|
|
7
|
+
<script type="text/javascript">
|
|
8
|
+
var mainUrl = 'index.html';
|
|
9
|
+
try {
|
|
10
|
+
var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
|
|
11
|
+
var name = match ? match[1] : mainUrl;
|
|
12
|
+
var url = new URL(name, location.href);
|
|
13
|
+
window.top.location.replace(url.origin === location.origin ? name : mainUrl);
|
|
14
|
+
} catch (e) {
|
|
15
|
+
window.top.location.replace(mainUrl);
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
<noscript>
|
|
19
|
+
<h1>Oops!</h1>
|
|
20
|
+
<h2>YARD requires JavaScript!</h2>
|
|
21
|
+
</noscript>
|
|
22
|
+
</html>
|
data/docs/index.html
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
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
|
+
File: README
|
|
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 = "README";
|
|
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</a> »
|
|
40
|
+
<span class="title">File: README</span>
|
|
41
|
+
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div id="search">
|
|
45
|
+
|
|
46
|
+
<a class="full_list_link" id="class_list_link"
|
|
47
|
+
href="class_list.html">
|
|
48
|
+
|
|
49
|
+
<svg width="24" height="24">
|
|
50
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
51
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
52
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
</svg>
|
|
54
|
+
</a>
|
|
55
|
+
|
|
56
|
+
</div>
|
|
57
|
+
<div class="clear"></div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div id="content"><div id='filecontents'><h1 align="center">yamlint</h1><p align="center">
|
|
61
|
+
<img src="https://img.shields.io/badge/ruby-%3E%3D%203.1-ruby.svg" alt="Ruby Version"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"><a href="https://github.com/ydah/yamlint/actions/workflows/test.yml"><img src="https://github.com/ydah/yamlint/actions/workflows/test.yml/badge.svg?branch=main" alt="test"></a><a href="https://badge.fury.io/rb/yamlint"><img src="https://badge.fury.io/rb/yamlint.svg" alt="Gem Version"></a>
|
|
62
|
+
</p><p align="center">
|
|
63
|
+
A Ruby CLI for linting and formatting YAML files
|
|
64
|
+
</p><p align="center">
|
|
65
|
+
<a href="#features">Features</a> •
|
|
66
|
+
<a href="#quickstart">Quickstart</a> •
|
|
67
|
+
<a href="#installation">Installation</a> •
|
|
68
|
+
<a href="#usage">Usage</a> •
|
|
69
|
+
<a href="#configuration">Configuration</a> •
|
|
70
|
+
<a href="#rules">Rules</a>
|
|
71
|
+
</p>
|
|
72
|
+
<h2 id="features">Features</h2>
|
|
73
|
+
<ul><li>
|
|
74
|
+
<p>Rule-based linting and auto-formatting</p>
|
|
75
|
+
</li><li>
|
|
76
|
+
<p>Configuration via <code>.yamllint(.yml/.yaml)</code> with preset <code>extends</code></p>
|
|
77
|
+
</li><li>
|
|
78
|
+
<p>CI-friendly output formats (standard/parsable/colored/github)</p>
|
|
79
|
+
</li><li>
|
|
80
|
+
<p>YAML file patterns and ignore support</p>
|
|
81
|
+
</li></ul>
|
|
82
|
+
|
|
83
|
+
<h2 id="quickstart">Quickstart</h2>
|
|
84
|
+
|
|
85
|
+
<pre class="code ruby"><code class="ruby">gem install yamlint
|
|
86
|
+
|
|
87
|
+
# lint
|
|
88
|
+
yamlint .
|
|
89
|
+
|
|
90
|
+
# format (dry-run)
|
|
91
|
+
yamlint format --dry-run .
|
|
92
|
+
</code></pre>
|
|
93
|
+
|
|
94
|
+
<h2 id="installation">Installation</h2>
|
|
95
|
+
|
|
96
|
+
<p>With Bundler:</p>
|
|
97
|
+
|
|
98
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_add'>add</span> <span class='id identifier rubyid_yamlint'>yamlint</span>
|
|
99
|
+
</code></pre>
|
|
100
|
+
|
|
101
|
+
<p>Without Bundler:</p>
|
|
102
|
+
|
|
103
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_yamlint'>yamlint</span>
|
|
104
|
+
</code></pre>
|
|
105
|
+
|
|
106
|
+
<h2 id="usage">Usage</h2>
|
|
107
|
+
|
|
108
|
+
<p>Basic:</p>
|
|
109
|
+
|
|
110
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_yamlint'>yamlint</span> <span class='period'>.</span>
|
|
111
|
+
<span class='id identifier rubyid_yamlint'>yamlint</span> <span class='id identifier rubyid_path'>path</span><span class='op'>/</span><span class='id identifier rubyid_to'>to</span><span class='op'>/</span><span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_yml'>yml</span>
|
|
112
|
+
</code></pre>
|
|
113
|
+
|
|
114
|
+
<p>Formatting:</p>
|
|
115
|
+
|
|
116
|
+
<pre class="code ruby"><code class="ruby">yamlint format .
|
|
117
|
+
yamlint format --dry-run .
|
|
118
|
+
</code></pre>
|
|
119
|
+
|
|
120
|
+
<p>CI output:</p>
|
|
121
|
+
|
|
122
|
+
<pre class="code ruby"><code class="ruby">yamlint -f github .
|
|
123
|
+
</code></pre>
|
|
124
|
+
|
|
125
|
+
<p>Help:</p>
|
|
126
|
+
|
|
127
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_yamlint'>yamlint</span> <span class='op'>-</span><span class='op'>-</span><span class='id identifier rubyid_help'>help</span>
|
|
128
|
+
</code></pre>
|
|
129
|
+
|
|
130
|
+
<h2 id="configuration">Configuration</h2>
|
|
131
|
+
|
|
132
|
+
<p>Default config file names:</p>
|
|
133
|
+
<ul><li>
|
|
134
|
+
<p><code>.yamllint</code></p>
|
|
135
|
+
</li><li>
|
|
136
|
+
<p><code>.yamllint.yml</code></p>
|
|
137
|
+
</li><li>
|
|
138
|
+
<p><code>.yamllint.yaml</code></p>
|
|
139
|
+
</li></ul>
|
|
140
|
+
|
|
141
|
+
<p>Configuration options:</p>
|
|
142
|
+
|
|
143
|
+
<table role="table">
|
|
144
|
+
<thead>
|
|
145
|
+
<tr>
|
|
146
|
+
<th>Option</th>
|
|
147
|
+
<th>Type</th>
|
|
148
|
+
<th>Default</th>
|
|
149
|
+
<th>Behavior</th>
|
|
150
|
+
</tr>
|
|
151
|
+
</thead>
|
|
152
|
+
<tbody>
|
|
153
|
+
<tr>
|
|
154
|
+
<td><code>extends</code></td>
|
|
155
|
+
<td>string</td>
|
|
156
|
+
<td>none</td>
|
|
157
|
+
<td>Inherit a preset (<code>default</code> or <code>relaxed</code>). Values from the current file override the preset.</td>
|
|
158
|
+
</tr>
|
|
159
|
+
<tr>
|
|
160
|
+
<td><code>yaml-files</code></td>
|
|
161
|
+
<td>list of glob strings</td>
|
|
162
|
+
<td><code>["*.yaml", "*.yml"]</code></td>
|
|
163
|
+
<td>Glob patterns used when discovering YAML files in directories.</td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td><code>ignore</code></td>
|
|
167
|
+
<td>list of strings</td>
|
|
168
|
+
<td><code>[]</code></td>
|
|
169
|
+
<td>List of paths to skip. Parsed by the config loader but not currently applied to file discovery.</td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td><code>rules</code></td>
|
|
173
|
+
<td>map</td>
|
|
174
|
+
<td><code>{}</code></td>
|
|
175
|
+
<td>Per-rule configuration. Set a rule to <code>disable</code> or <code>false</code> to turn it off, or provide a map of options.</td>
|
|
176
|
+
</tr>
|
|
177
|
+
</tbody>
|
|
178
|
+
</table>
|
|
179
|
+
|
|
180
|
+
<p>Notes:</p>
|
|
181
|
+
<ul><li>
|
|
182
|
+
<p>Rule option keys accept either <code>snake_case</code> or <code>kebab-case</code> and are normalized internally.</p>
|
|
183
|
+
</li><li>
|
|
184
|
+
<p>Rule option defaults come from the rule implementation and are merged with your overrides.</p>
|
|
185
|
+
</li></ul>
|
|
186
|
+
|
|
187
|
+
<p>Example:</p>
|
|
188
|
+
|
|
189
|
+
<pre class="code ruby"><code class="ruby">extends: default
|
|
190
|
+
|
|
191
|
+
yaml-files:
|
|
192
|
+
- "*.yml"
|
|
193
|
+
- "*.yaml"
|
|
194
|
+
|
|
195
|
+
ignore:
|
|
196
|
+
- vendor
|
|
197
|
+
- node_modules
|
|
198
|
+
|
|
199
|
+
rules:
|
|
200
|
+
line-length:
|
|
201
|
+
max: 120
|
|
202
|
+
document-start: disable
|
|
203
|
+
truthy:
|
|
204
|
+
allowed-values: ["true", "false"]
|
|
205
|
+
</code></pre>
|
|
206
|
+
|
|
207
|
+
<h2 id="presets">Presets</h2>
|
|
208
|
+
|
|
209
|
+
<p>Available presets:</p>
|
|
210
|
+
<ul><li>
|
|
211
|
+
<p><code>default</code></p>
|
|
212
|
+
</li><li>
|
|
213
|
+
<p><code>relaxed</code></p>
|
|
214
|
+
</li></ul>
|
|
215
|
+
|
|
216
|
+
<pre class="code ruby"><code class="ruby">extends: relaxed
|
|
217
|
+
</code></pre>
|
|
218
|
+
|
|
219
|
+
<h2 id="rules">Rules</h2>
|
|
220
|
+
|
|
221
|
+
<p>Key rules:</p>
|
|
222
|
+
<ul><li>
|
|
223
|
+
<p>anchors, braces, brackets, colons, commas, comments, comments-indentation</p>
|
|
224
|
+
</li><li>
|
|
225
|
+
<p>document-start, document-end, empty-lines, empty-values, float-values</p>
|
|
226
|
+
</li><li>
|
|
227
|
+
<p>hyphens, indentation, key-duplicates, key-ordering, line-length</p>
|
|
228
|
+
</li><li>
|
|
229
|
+
<p>new-lines, new-line-at-end-of-file, octal-values, quoted-strings</p>
|
|
230
|
+
</li><li>
|
|
231
|
+
<p>trailing-spaces, truthy</p>
|
|
232
|
+
</li></ul>
|
|
233
|
+
|
|
234
|
+
<h2 id="output-formats">Output formats</h2>
|
|
235
|
+
|
|
236
|
+
<p>Use <code>-f</code>/<code>--format</code> to select an output format:</p>
|
|
237
|
+
<ul><li>
|
|
238
|
+
<p><code>standard</code></p>
|
|
239
|
+
</li><li>
|
|
240
|
+
<p><code>parsable</code></p>
|
|
241
|
+
</li><li>
|
|
242
|
+
<p><code>colored</code></p>
|
|
243
|
+
</li><li>
|
|
244
|
+
<p><code>github</code></p>
|
|
245
|
+
</li></ul>
|
|
246
|
+
|
|
247
|
+
<h2 id="development">Development</h2>
|
|
248
|
+
|
|
249
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bin'>bin</span><span class='op'>/</span><span class='id identifier rubyid_setup'>setup</span>
|
|
250
|
+
<span class='id identifier rubyid_rake'>rake</span> <span class='id identifier rubyid_spec'>spec</span>
|
|
251
|
+
</code></pre>
|
|
252
|
+
|
|
253
|
+
<p>Install locally:</p>
|
|
254
|
+
|
|
255
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_exec'>exec</span> <span class='id identifier rubyid_rake'>rake</span> <span class='id identifier rubyid_install'>install</span>
|
|
256
|
+
</code></pre>
|
|
257
|
+
|
|
258
|
+
<p>Release:</p>
|
|
259
|
+
|
|
260
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_exec'>exec</span> <span class='id identifier rubyid_rake'>rake</span> <span class='id identifier rubyid_release'>release</span>
|
|
261
|
+
</code></pre>
|
|
262
|
+
|
|
263
|
+
<h2 id="license">License</h2>
|
|
264
|
+
|
|
265
|
+
<p>MIT License. See <code>LICENSE.txt</code> for details.</p>
|
|
266
|
+
</div></div>
|
|
267
|
+
|
|
268
|
+
<div id="footer">
|
|
269
|
+
Generated on Sun Jan 25 08:00:08 2026 by
|
|
270
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
271
|
+
0.9.38 (ruby-4.0.0).
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
</div>
|
|
275
|
+
</body>
|
|
276
|
+
</html>
|