@owenlamont/ryl-linux-x64-musl 0.9.1 → 0.9.2

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.
Files changed (3) hide show
  1. package/README.md +80 -259
  2. package/bin/ryl +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,27 @@
1
1
  # ryl
2
2
 
3
- ryl - the Rust Yaml Linter is intended to ultimately be a drop in replacement for
4
- [yamllint](https://github.com/adrienverge/yamllint). It is usable today, but
5
- parity and edge-case behavior are still maturing.
3
+ ryl - the Rust YAML linter - is intended to ultimately be a drop-in
4
+ replacement for [yamllint](https://github.com/adrienverge/yamllint). It is
5
+ usable today, but parity and edge-case behaviour are still maturing.
6
6
 
7
- Compatibility note:
7
+ Full documentation lives at <https://ryl-docs.pages.dev/>.
8
8
 
9
- - `ryl` aims to match `yamllint` behavior and includes many parity tests.
10
- - `ryl` uses the `saphyr` parser stack, while `yamllint` uses the `PyYAML` parser stack.
9
+ ## Compatibility note
10
+
11
+ - `ryl` aims to match `yamllint` behaviour and includes many parity tests.
12
+ - `ryl` uses the `saphyr` parser stack, while `yamllint` uses the `PyYAML`
13
+ parser stack.
11
14
  - `saphyr` and `PyYAML` do not always agree on which files are valid YAML.
15
+ - **`ryl` targets YAML 1.2 strictly.** `yamllint` defaults to YAML 1.1
16
+ semantics, so bareword booleans like `yes` / `no` / `on` / `off` (and
17
+ case variants) are plain strings in `ryl` and booleans in `yamllint`.
18
+ Leading-zero integers like `0755` are decimal in `ryl` and octal in
19
+ `yamllint`. The same 1.2 semantics also apply when `ryl` parses
20
+ `.yamllint` configuration files inherited from `yamllint`. See the
21
+ [YAML version compatibility](https://ryl-docs.pages.dev/yaml-version/)
22
+ page for the practical implications.
12
23
 
13
- ## Quick Start
24
+ ## Quick start
14
25
 
15
26
  ```bash
16
27
  # Using uv (Python)
@@ -25,262 +36,72 @@ For `prek` / `pre-commit` integration, see
25
36
 
26
37
  ## Installation
27
38
 
28
- ### uv
29
-
30
39
  ```bash
31
- uv tool install ryl
32
- ```
33
-
34
- ### NPM
35
-
36
- ```bash
37
- npm install -g @owenlamont/ryl
38
- ```
39
-
40
- ### pip
41
-
42
- ```bash
43
- pip install ryl
44
- ```
45
-
46
- ### Cargo
47
-
48
- ```bash
49
- cargo install ryl
50
- ```
51
-
52
- ## Usage
53
-
54
- ryl accepts one or more paths: files and/or directories.
55
-
56
- Basic:
57
-
58
- ```text
59
- ryl <PATH_OR_FILE> [PATH_OR_FILE...]
60
- ```
61
-
62
- Behavior:
63
-
64
- - Files: parsed as YAML even if the extension is not `.yml`/`.yaml`.
65
- - Directories: recursively lints `.yml` and `.yaml` files.
66
- - Respects `.gitignore`, global git ignores, and git excludes.
67
- - Does not follow symlinks.
68
-
69
- Exit codes:
70
-
71
- - `0` when all parsed files are valid (or no files found).
72
- - `1` when any invalid YAML is found.
73
- - `2` for CLI usage errors (for example, no paths provided).
74
-
75
- Examples:
76
-
77
- ```text
78
- # Single file
79
- ryl myfile.yml
80
-
81
- # Multiple inputs (mix files and directories)
82
- ryl config/ another.yml
83
-
84
- # Multiple directories
85
- ryl dir1 dir2
86
-
87
- # Explicit non-YAML extension (parsed as YAML)
88
- ryl notes.txt
89
- ```
90
-
91
- Help and version:
92
-
93
- ```text
94
- Fast YAML linter written in Rust
95
-
96
- Usage: ryl [OPTIONS] [PATH_OR_FILE]...
97
-
98
- Arguments:
99
- [PATH_OR_FILE]... One or more paths: files and/or directories
100
-
101
- Options:
102
- -c, --config-file <FILE> Path to configuration file (YAML or TOML)
103
- -d, --config-data <YAML> Inline configuration data (yaml)
104
- -f, --format <FORMAT> Output format (auto, standard, colored, github,
105
- parsable) [default: auto]
106
- [possible values: auto, standard, colored,
107
- github, parsable]
108
- --print-toml-config-schema Print the JSON Schema for ryl TOML config
109
- and exit
110
- --print-yaml-config-schema Print the JSON Schema for yamllint-compatible
111
- YAML config and exit
112
- --fix Apply safe fixes in place before reporting
113
- remaining diagnostics
114
- --migrate-configs Convert discovered legacy YAML config files
115
- into .ryl.toml files
116
- --list-files List files that would be linted (reserved)
117
- -s, --strict Strict mode (reserved)
118
- --no-warnings Suppress warnings (reserved)
119
- --migrate-root <DIR> Root path to search for legacy YAML config
120
- files (default: .)
121
- --migrate-write Write migrated .ryl.toml files (otherwise
122
- preview only)
123
- --migrate-stdout Print generated TOML to stdout during migration
124
- --migrate-rename-old <SUFFIX> Rename source YAML configs by appending
125
- this suffix after migration
126
- --migrate-delete-old Delete source YAML configs after migration
127
- -h, --help Print help
128
- -V, --version Print version
129
- ```
130
-
131
- ## Performance benchmarking
132
-
133
- This repo includes a standalone benchmark script that compares PyPI `ryl` and
134
- `yamllint` using synthetic YAML corpora and `hyperfine`.
135
-
136
- Prerequisites:
137
-
138
- - `uv`
139
- - `hyperfine`
140
-
141
- Run a quick sample:
142
-
143
- ```text
144
- uv run scripts/benchmark_perf_vs_yamllint.py --file-counts 25,100 --file-sizes-kib 1,8 --runs 5 --warmup 1
145
- ```
146
-
147
- Run a fuller matrix (explicit lists):
148
-
149
- ```text
150
- uv run scripts/benchmark_perf_vs_yamllint.py --file-counts 25,100,400,1000 --file-sizes-kib 1,8,32,128 --runs 10 --warmup 2
151
- ```
152
-
153
- Run a fuller matrix (ranges with increments):
154
-
155
- ```text
156
- uv run scripts/benchmark_perf_vs_yamllint.py --file-count-start 100 --file-count-end 1000 --file-count-step 100 --file-size-start-kib 4 --file-size-end-kib 64 --file-size-step-kib 4 --runs 10 --warmup 2
157
- ```
158
-
159
- The script uses Typer; use `--help` for all options.
160
-
161
- Artifacts are written under `manual_outputs/benchmarks/<UTC_TIMESTAMP>/`:
162
-
163
- - `benchmark.png` and `benchmark.svg`: side-by-side facet plot with shared Y axis.
164
- - `summary.csv`: aggregated timing table.
165
- - `meta.json`: tool versions and run parameters.
166
- - `hyperfine-json/`: raw results from `hyperfine`.
167
-
168
- Example benchmark figure (5x5 matrix, 5 runs per point):
169
-
170
- ![Benchmark: ryl vs yamllint scaling (5x5 matrix, 5 runs per point)](https://raw.githubusercontent.com/owenlamont/ryl/v0.3.4/img/benchmark-5x5-5runs.svg)
171
-
172
- ## Configuration
173
-
174
- - Flags:
175
- - `-c, --config-file <FILE>`: path to a YAML or TOML config file.
176
- - `-d, --config-data <YAML>`: inline YAML config (highest precedence).
177
- - `--print-toml-config-schema`: print the JSON Schema for `.ryl.toml` / `ryl.toml` / `[tool.ryl]`.
178
- - `--print-yaml-config-schema`: print the JSON Schema for yamllint-compatible
179
- YAML config files such as `.yamllint` / `.yamllint.yml` / `.yamllint.yaml`.
180
- - `--fix`: apply safe fixes in place before reporting remaining diagnostics.
181
- - `--list-files`: print files that would be linted after applying ignores and exit.
182
- - `--migrate-configs`: discover legacy YAML configs and plan TOML migration.
183
- - `--migrate-root <DIR>`: root to search for legacy YAML configs (default `.`).
184
- - `--migrate-write`: write migrated `.ryl.toml` files (without this it is preview-only).
185
- - `--migrate-stdout`: print generated TOML in migration mode.
186
- - `--migrate-rename-old <SUFFIX>`: rename discovered legacy YAML config files after writing.
187
- - `--migrate-delete-old`: delete discovered legacy YAML config files after writing.
188
- - `-f, --format`, `-s, --strict`, `--no-warnings`: reserved for compatibility.
189
- - Discovery precedence:
190
- inline `--config-data` > `--config-file` > env `YAMLLINT_CONFIG_FILE`
191
- (global) > nearest project config up the tree:
192
- TOML (`.ryl.toml`, `ryl.toml`, `pyproject.toml` with `[tool.ryl]`) then
193
- YAML fallback (`.yamllint`, `.yamllint.yml`, `.yamllint.yaml`)
194
- > user-global (`$XDG_CONFIG_HOME/yamllint/config` or
195
- `~/.config/yamllint/config`) > built-in defaults.
196
- - **Rules Documentation**: see [docs/rules.md](https://github.com/owenlamont/ryl/blob/main/docs/rules.md)
197
- for a full list of supported rules and their fixable status.
198
- - TOML and YAML are not merged during discovery. If a TOML project config is
199
- found, YAML project config discovery is skipped (and `ryl` prints a warning).
200
- - Native fix policy and per-file ignores are TOML-only. YAML config remains
201
- yamllint-compatible and does not support ryl-native settings.
202
- - Per-file behavior: unless a global config is set via `--config-data`,
203
- `--config-file`, or `YAMLLINT_CONFIG_FILE`, each file discovers its nearest
204
- project config. Ignores apply to directory scans and explicit files (parity).
205
- - Presets and extends: supports yamllint’s built-in `default`, `relaxed`, and
206
- `empty` via `extends`. Rule maps are deep-merged; scalars/sequences overwrite.
207
- - TOML preset examples: see
208
- [docs/config-presets.md](https://github.com/owenlamont/ryl/blob/main/docs/config-presets.md)
209
- for `default`/`relaxed` equivalents.
210
- - Canonical schema artifacts are checked into this repo as:
211
- - `ryl.toml.schema.json` for `.ryl.toml` / `ryl.toml` / `[tool.ryl]`
212
- - `ryl.yaml.schema.json` for yamllint-compatible YAML config files such as
213
- `.yamllint` / `.yamllint.yml` / `.yamllint.yaml`
214
- - SchemaStore sync only targets the native TOML config and publishes a draft-07
215
- projection for `ryl.toml` / `.ryl.toml`. SchemaStore cannot target the
216
- `[tool.ryl]` table inside `pyproject.toml`, so that remains covered by the
217
- broader `pyproject.toml` schema association.
218
- - Release-time SchemaStore sync updates `owenlamont/schemastore:ryl-schema-update`
219
- after a release succeeds and prints the manual upstream PR details in the
220
- workflow summary.
221
- - Regenerate them with:
222
- - `cargo run --quiet --bin ryl -- --print-toml-config-schema > ryl.toml.schema.json`
223
- - `cargo run --quiet --bin ryl -- --print-yaml-config-schema > ryl.yaml.schema.json`
224
- - Print the SchemaStore projection locally with:
225
- - `uv run scripts/print_ryl_schemastore_schema.py > /tmp/ryl.schemastore.json`
226
-
227
- Example TOML config (`.ryl.toml`):
228
-
229
- ```toml
230
- yaml-files = ["*.yaml", "*.yml"]
231
- ignore = ["vendor/**", "generated/**"]
232
- locale = "en_US.UTF-8"
233
-
234
- [per-file-ignores]
235
- "**/values.yaml" = ["document-start"]
236
- "**/kustomization.yaml" = ["document-start"]
237
- # `!` negates the pattern, so this ignores truthy outside Kubernetes manifests.
238
- "!k8s/**.yaml" = ["truthy"]
239
-
240
- [rules]
241
- document-start = "disable"
242
-
243
- [rules.line-length]
244
- max = 120
245
-
246
- [rules.truthy]
247
- allowed-values = ["true", "false"]
248
-
249
- [fix]
250
- fixable = ["ALL"]
251
- unfixable = []
40
+ uv tool install ryl # uv
41
+ npm install -g @owenlamont/ryl # npm
42
+ pip install ryl # pip
43
+ cargo install ryl # cargo
252
44
  ```
253
45
 
254
- For a fully expanded TOML example that names every built-in rule explicitly, see
255
- [`/.ryl.toml.example`](https://github.com/owenlamont/ryl/blob/main/.ryl.toml.example).
256
-
257
- Migration example:
258
-
259
- ```text
260
- # Preview migration actions
261
- ryl --migrate-configs --migrate-root .
262
-
263
- # Write .ryl.toml files and keep old files with a suffix
264
- ryl --migrate-configs --migrate-root . --migrate-write --migrate-rename-old .bak
265
- ```
46
+ ## Status and scope
47
+
48
+ - All 23 yamllint rules are implemented. The current rule reference and
49
+ per-rule pages are at
50
+ <https://ryl-docs.pages.dev/rules/>.
51
+ - Auto-fixing (`--fix`) is supported for `braces`, `brackets`, `commas`,
52
+ `comments`, `comments-indentation`, `new-line-at-end-of-file`,
53
+ `new-lines`, and `quoted-strings`. The set of rules that may apply
54
+ fixes is configurable via the TOML `[fix]` table.
55
+ - TOML is the recommended configuration format and supports ryl-only
56
+ features that have no upstream equivalent: the `[fix]` table,
57
+ `[per-file-ignores]`, and rule options such as
58
+ `allow-double-quotes-for-escaping`.
59
+ - yamllint-style YAML configuration is also accepted (`.yamllint`,
60
+ `.yamllint.yml`, `.yamllint.yaml`) for drop-in compatibility, including
61
+ the built-in `default`, `relaxed`, and `empty` presets via `extends`.
62
+ An existing yamllint configuration can be converted with
63
+ `ryl --migrate-configs --migrate-write`.
64
+ - `--list-files` prints the files ryl would lint (after ignores and
65
+ config discovery) and exits, without running rules. `--no-warnings`
66
+ suppresses warning-level diagnostics in the output. `--strict` turns a
67
+ warning-only run into exit code `2`.
68
+ - Run `ryl --help` for the authoritative CLI reference.
69
+
70
+ For installation walkthroughs, configuration presets, and per-rule
71
+ documentation, see the docs site.
72
+
73
+ ## Performance
74
+
75
+ `ryl` is significantly faster than `yamllint` on large trees. The figure
76
+ below is from a 5x5 file-count × file-size matrix with 5 runs per point:
77
+
78
+ ![Benchmark: ryl vs yamllint scaling (5x5 matrix, 5 runs per point)](https://raw.githubusercontent.com/owenlamont/ryl/main/img/benchmark-5x5-5runs.svg)
79
+
80
+ The benchmark script is in `scripts/benchmark_perf_vs_yamllint.py`; run
81
+ it with `--help` for the full option set.
266
82
 
267
83
  ## Acknowledgements
268
84
 
269
- This project exists thanks to the tooling and ecosystems around YAML linting and
270
- developer automation, especially:
271
-
272
- - [yamllint](https://github.com/adrienverge/yamllint) - for giving me the shoulders to
273
- stand on and the source of many of the automated tests that ryl uses now to check for
274
- behaviour parity. Copying the behaviour of an existing tool is infinitely easier than
275
- building one from scratch - there'd be no ryl without yamllint.
276
- - [ruff](https://github.com/astral-sh/ruff) - for showing the power of Rust tooling for
277
- Python development and inspiring the config and API for ryl.
278
- - [rumdl](https://github.com/rvben/rumdl) - for giving me another template to follow for
279
- Rust tooling and showing me almost the only dev tool I was still using after this that
280
- wasn't written in Rust was yamllint (which inspired me to tackle this project)
281
- - [saphyr](https://github.com/saphyr-rs/saphyr) - ryl is built on saphyr and saphyr's
282
- developers were very patient in showing some of the nuance and complexity of parsing
283
- YAML which I was embarrassingly ignorant of when start ryl.
85
+ This project exists thanks to the tooling and ecosystems around YAML
86
+ linting and developer automation, especially:
87
+
88
+ - [yamllint](https://github.com/adrienverge/yamllint) - for giving me the
89
+ shoulders to stand on and the source of many of the automated tests
90
+ that ryl uses now to check for behaviour parity. Copying the behaviour
91
+ of an existing tool is infinitely easier than building one from
92
+ scratch - there'd be no ryl without yamllint.
93
+ - [ruff](https://github.com/astral-sh/ruff) - for showing the power of
94
+ Rust tooling for Python development and inspiring the config and API
95
+ for ryl.
96
+ - [rumdl](https://github.com/rvben/rumdl) - for giving me another
97
+ template to follow for Rust tooling and showing me almost the only dev
98
+ tool I was still using after this that wasn't written in Rust was
99
+ yamllint (which inspired me to tackle this project).
100
+ - [saphyr](https://github.com/saphyr-rs/saphyr) - ryl is built on saphyr
101
+ and saphyr's developers were very patient in showing some of the
102
+ nuance and complexity of parsing YAML which I was embarrassingly
103
+ ignorant of when starting ryl.
284
104
  - [esbuild](https://github.com/evanw/esbuild) and
285
- [biome](https://github.com/biomejs/biome) - for providing the "binary wrapper"
286
- blueprint for distributing high-performance native tools via NPM.
105
+ [biome](https://github.com/biomejs/biome) - for providing the "binary
106
+ wrapper" blueprint for distributing high-performance native tools via
107
+ NPM.
package/bin/ryl CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owenlamont/ryl-linux-x64-musl",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Fast YAML linter inspired by yamllint",
5
5
  "author": "Owen Lamont",
6
6
  "license": "MIT",