@owenlamont/ryl-win32-arm64-msvc 0.23.0 → 0.25.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.
- package/README.md +44 -47
- package/bin/ryl.exe +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,45 +1,39 @@
|
|
|
1
1
|
# ryl
|
|
2
2
|
|
|
3
|
-
ryl
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
ryl is a fast YAML linter and formatter written in Rust. It checks YAML style,
|
|
4
|
+
applies safe lint fixes, and formats files with configurable layout. It is usable
|
|
5
|
+
today, but edge-case behaviour is still maturing.
|
|
6
6
|
|
|
7
7
|
Full documentation lives at <https://ryl-docs.pages.dev/>.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
`PyYAML` parser stack.
|
|
14
|
-
- `granit-parser` and `PyYAML` do not always agree on which files are valid
|
|
15
|
-
YAML.
|
|
16
|
-
- **`ryl` targets YAML 1.2 strictly.** `yamllint` defaults to YAML 1.1
|
|
17
|
-
semantics, so bareword booleans like `yes` / `no` / `on` / `off` (and
|
|
18
|
-
case variants) are plain strings in `ryl` and booleans in `yamllint`.
|
|
19
|
-
Leading-zero integers like `0755` are decimal in `ryl` and octal in
|
|
20
|
-
`yamllint`. The same 1.2 semantics also apply when `ryl` parses
|
|
21
|
-
`.yamllint` configuration files inherited from `yamllint`. See the
|
|
22
|
-
[YAML version compatibility](https://ryl-docs.pages.dev/yaml-version/)
|
|
23
|
-
page for the practical implications.
|
|
9
|
+
ryl targets YAML 1.2. See [YAML version compatibility](https://ryl-docs.pages.dev/yaml-version/)
|
|
10
|
+
for how version directives and implicit types affect linting and formatting.
|
|
11
|
+
|
|
12
|
+
Coming from yamllint? See the [migration guide](https://ryl-docs.pages.dev/getting-started/migrating-from-yamllint/).
|
|
24
13
|
|
|
25
14
|
## Quick start
|
|
26
15
|
|
|
27
|
-
ryl enables no rules by default, so it needs a configuration
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
ryl enables no rules by default, so it needs a configuration or `--enable` that
|
|
17
|
+
turns rules on. `--enable ALL` runs every rule for a one-off run, and
|
|
18
|
+
`--enable <RULES>` runs just the named rules; for a project,
|
|
19
|
+
drop a `.ryl.toml` at the root (see
|
|
30
20
|
[Configuration](https://ryl-docs.pages.dev/getting-started/quickstart/)).
|
|
31
21
|
|
|
32
|
-
`ryl check` is the lint subcommand
|
|
33
|
-
|
|
22
|
+
`ryl check` is the lint subcommand and the recommended form; `ryl format` is the
|
|
23
|
+
formatter. Bare `ryl <paths>` still lints identically but is deprecated: it
|
|
34
24
|
prints a warning to stderr (silenced by `--no-warnings`) and a later release will
|
|
35
25
|
remove it, so prefer `ryl check`.
|
|
36
26
|
|
|
37
27
|
```bash
|
|
38
28
|
# Using uv (Python)
|
|
39
|
-
uvx ryl check
|
|
29
|
+
uvx ryl check --enable ALL .
|
|
40
30
|
|
|
41
31
|
# Using npx (Node.js)
|
|
42
|
-
npx @owenlamont/ryl check
|
|
32
|
+
npx @owenlamont/ryl check --enable ALL .
|
|
33
|
+
|
|
34
|
+
# Format in place, or check formatting in CI
|
|
35
|
+
uvx ryl format .
|
|
36
|
+
uvx ryl format --check .
|
|
43
37
|
```
|
|
44
38
|
|
|
45
39
|
For `prek` / `pre-commit` integration, see
|
|
@@ -61,22 +55,26 @@ newer. The prebuilt wheels, npm, conda-forge and winget packages do not.
|
|
|
61
55
|
|
|
62
56
|
## Status and scope
|
|
63
57
|
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
- `ryl format` formats YAML in place without enabling lint rules. Its `--check`
|
|
59
|
+
and `--diff` modes preview changes without writing; `[format]` in TOML controls
|
|
60
|
+
the style. It also formats embedded YAML in Markdown with `--markdown`.
|
|
61
|
+
- ryl includes 27 rules, including `tags`, `merge-keys`,
|
|
62
|
+
`block-scalar-chomping`, and `unicode-line-breaks`. The rule reference
|
|
67
63
|
and per-rule pages are at <https://ryl-docs.pages.dev/rules/>.
|
|
68
|
-
- Auto-fixing (`--fix`) is supported for `braces`, `brackets`, `
|
|
69
|
-
`comments`, `comments-indentation`, `document-end`,
|
|
70
|
-
`
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
- Auto-fixing (`--fix`) is supported for `braces`, `brackets`, `colons`,
|
|
65
|
+
`commas`, `comments`, `comments-indentation`, `document-end`,
|
|
66
|
+
`document-start`, `empty-lines`, `hyphens`, `key-ordering`,
|
|
67
|
+
`new-line-at-end-of-file`, `new-lines`, `quoted-strings`, `trailing-spaces`,
|
|
68
|
+
and `truthy` (case only, e.g. `True` to `true`). The set of rules that may
|
|
69
|
+
apply fixes is configurable via the TOML `lint.fixable`/`lint.unfixable`
|
|
70
|
+
keys.
|
|
73
71
|
- `--diff` previews those safe fixes as a unified diff on stdout instead
|
|
74
72
|
of writing them (modelled on `ruff check --diff`); it is mutually
|
|
75
73
|
exclusive with `--fix`, works with stdin, and exits `1` iff some file
|
|
76
74
|
would change.
|
|
77
|
-
- TOML is the recommended configuration format and supports
|
|
78
|
-
|
|
79
|
-
`[per-file-ignores]`, and rule options such as
|
|
75
|
+
- TOML is the recommended configuration format and supports
|
|
76
|
+
the `lint.fixable`/`lint.unfixable`
|
|
77
|
+
fix policy, `[lint.per-file-ignores]`, and rule options such as
|
|
80
78
|
`allow-double-quotes-for-escaping`.
|
|
81
79
|
- TOML assigns each file a source kind via the `[files]` table
|
|
82
80
|
(`yaml = [...]`, `markdown = [...]`). The legacy `yaml-files` key is YAML-only;
|
|
@@ -86,15 +84,16 @@ newer. The prebuilt wheels, npm, conda-forge and winget packages do not.
|
|
|
86
84
|
to the Markdown file. It is off by default; `--fix` writes safe fixes back into
|
|
87
85
|
the embedded blocks and `--diff` previews them at the host-file level. See
|
|
88
86
|
<https://ryl-docs.pages.dev/markdown/>.
|
|
89
|
-
-
|
|
90
|
-
`.yamllint.
|
|
91
|
-
|
|
92
|
-
An existing yamllint configuration can be converted with
|
|
87
|
+
- YAML configuration (`.yamllint`, `.yamllint.yml`,
|
|
88
|
+
`.yamllint.yaml`, including the `default`, `relaxed`, and `empty` presets via
|
|
89
|
+
`extends`) still works but is deprecated and warns; convert it with
|
|
93
90
|
`ryl --migrate-configs --migrate-write`.
|
|
94
91
|
- `--list-files` prints the files ryl would lint (after ignores and
|
|
95
92
|
config discovery) and exits, without running rules. `--no-warnings`
|
|
96
93
|
suppresses warning-level diagnostics in the output. `--strict` turns a
|
|
97
|
-
warning-only run into exit code `2`.
|
|
94
|
+
warning-only run into exit code `2`. `--enable <RULES>` runs exactly the
|
|
95
|
+
listed rules (comma-separated IDs, or `ALL`) in place of the config's
|
|
96
|
+
selection, and needs no config file.
|
|
98
97
|
- Pass `-` as the input to read YAML from stdin (ruff convention). Add
|
|
99
98
|
`--stdin-filename <PATH>` so diagnostics, project-config discovery,
|
|
100
99
|
and path-based filtering (`yaml-files`, per-file-ignores, per-rule
|
|
@@ -105,7 +104,7 @@ newer. The prebuilt wheels, npm, conda-forge and winget packages do not.
|
|
|
105
104
|
stdin, but `--diff` can.
|
|
106
105
|
- `ryl server` runs ryl as a Language Server (LSP) over stdio, giving
|
|
107
106
|
editors inline diagnostics, a `source.fixAll.ryl` code action, and
|
|
108
|
-
formatting
|
|
107
|
+
formatting via `ryl format`. It complements Red Hat's
|
|
109
108
|
`yaml-language-server` rather than replacing it, and is built in by
|
|
110
109
|
default (a minimal binary without it builds with
|
|
111
110
|
`cargo install ryl --no-default-features`). See
|
|
@@ -117,8 +116,8 @@ documentation, see the docs site.
|
|
|
117
116
|
|
|
118
117
|
## Performance
|
|
119
118
|
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
The figure below times ryl and yamllint over a 5x5 file-count × file-size
|
|
120
|
+
matrix with 5 runs per point:
|
|
122
121
|
|
|
123
122
|

|
|
124
123
|
|
|
@@ -139,9 +138,7 @@ linting and developer automation, especially:
|
|
|
139
138
|
Rust tooling for Python development and inspiring the config and API
|
|
140
139
|
for ryl.
|
|
141
140
|
- [rumdl](https://github.com/rvben/rumdl) - for giving me another
|
|
142
|
-
template to follow for Rust tooling
|
|
143
|
-
tool I was still using after this that wasn't written in Rust was
|
|
144
|
-
yamllint (which inspired me to tackle this project).
|
|
141
|
+
template to follow for Rust tooling.
|
|
145
142
|
- [saphyr](https://github.com/saphyr-rs/saphyr) - ryl's vendored YAML DOM
|
|
146
143
|
is derived from saphyr, and saphyr's developers were very patient in
|
|
147
144
|
showing some of the nuance and complexity of parsing YAML which I was
|
package/bin/ryl.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owenlamont/ryl-win32-arm64-msvc",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Fast YAML linter
|
|
3
|
+
"version": "0.25.0",
|
|
4
|
+
"description": "Fast YAML linter and formatter",
|
|
5
5
|
"author": "Owen Lamont",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/owenlamont/ryl#readme",
|