@owenlamont/ryl-win32-arm64-msvc 0.24.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.
Files changed (3) hide show
  1. package/README.md +39 -46
  2. package/bin/ryl.exe +0 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,46 +1,39 @@
1
1
  # ryl
2
2
 
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.
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
- ## Compatibility note
10
-
11
- - `ryl` aims to match `yamllint` behaviour and includes many parity tests.
12
- - `ryl` uses the `granit-parser` parser stack, while `yamllint` uses the
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
16
  ryl enables no rules by default, so it needs a configuration or `--enable` that
28
- turns rules on. `-d 'extends: default'` opts into yamllint's standard rule set for
29
- a one-off run, and `--enable <RULES>` runs just the named rules; for a project,
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,
30
19
  drop a `.ryl.toml` at the root (see
31
20
  [Configuration](https://ryl-docs.pages.dev/getting-started/quickstart/)).
32
21
 
33
- `ryl check` is the lint subcommand (a `ryl format` formatter is coming) and the
34
- recommended form. Bare `ryl <paths>` still lints identically but is deprecated: it
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
35
24
  prints a warning to stderr (silenced by `--no-warnings`) and a later release will
36
25
  remove it, so prefer `ryl check`.
37
26
 
38
27
  ```bash
39
28
  # Using uv (Python)
40
- uvx ryl check -d 'extends: default' .
29
+ uvx ryl check --enable ALL .
41
30
 
42
31
  # Using npx (Node.js)
43
- npx @owenlamont/ryl check -d 'extends: default' .
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 .
44
37
  ```
45
38
 
46
39
  For `prek` / `pre-commit` integration, see
@@ -62,23 +55,26 @@ newer. The prebuilt wheels, npm, conda-forge and winget packages do not.
62
55
 
63
56
  ## Status and scope
64
57
 
65
- - All 23 yamllint rules are implemented, plus four ryl-only rules with no
66
- yamllint equivalent (`tags`, `merge-keys`, `block-scalar-chomping`, and
67
- `unicode-line-breaks`), configured in TOML only. The current rule reference
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
68
63
  and per-rule pages are at <https://ryl-docs.pages.dev/rules/>.
69
- - Auto-fixing (`--fix`) is supported for `braces`, `brackets`, `commas`,
70
- `comments`, `comments-indentation`, `document-end`, `document-start`,
71
- `empty-lines`, `key-ordering`, `new-line-at-end-of-file`, `new-lines`,
72
- `quoted-strings`, `trailing-spaces`, and `truthy` (case only, e.g. `True`
73
- to `true`). The set of rules that may apply fixes is configurable via the
74
- TOML `[fix]` table.
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.
75
71
  - `--diff` previews those safe fixes as a unified diff on stdout instead
76
72
  of writing them (modelled on `ruff check --diff`); it is mutually
77
73
  exclusive with `--fix`, works with stdin, and exits `1` iff some file
78
74
  would change.
79
- - TOML is the recommended configuration format and supports ryl-only
80
- features that have no upstream equivalent: the `[fix]` table,
81
- `[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
82
78
  `allow-double-quotes-for-escaping`.
83
79
  - TOML assigns each file a source kind via the `[files]` table
84
80
  (`yaml = [...]`, `markdown = [...]`). The legacy `yaml-files` key is YAML-only;
@@ -88,10 +84,9 @@ newer. The prebuilt wheels, npm, conda-forge and winget packages do not.
88
84
  to the Markdown file. It is off by default; `--fix` writes safe fixes back into
89
85
  the embedded blocks and `--diff` previews them at the host-file level. See
90
86
  <https://ryl-docs.pages.dev/markdown/>.
91
- - yamllint-style YAML configuration is also accepted (`.yamllint`,
92
- `.yamllint.yml`, `.yamllint.yaml`) for drop-in compatibility, including
93
- the built-in `default`, `relaxed`, and `empty` presets via `extends`.
94
- 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
95
90
  `ryl --migrate-configs --migrate-write`.
96
91
  - `--list-files` prints the files ryl would lint (after ignores and
97
92
  config discovery) and exits, without running rules. `--no-warnings`
@@ -109,7 +104,7 @@ newer. The prebuilt wheels, npm, conda-forge and winget packages do not.
109
104
  stdin, but `--diff` can.
110
105
  - `ryl server` runs ryl as a Language Server (LSP) over stdio, giving
111
106
  editors inline diagnostics, a `source.fixAll.ryl` code action, and
112
- formatting (= apply safe fixes). It complements Red Hat's
107
+ formatting via `ryl format`. It complements Red Hat's
113
108
  `yaml-language-server` rather than replacing it, and is built in by
114
109
  default (a minimal binary without it builds with
115
110
  `cargo install ryl --no-default-features`). See
@@ -121,8 +116,8 @@ documentation, see the docs site.
121
116
 
122
117
  ## Performance
123
118
 
124
- `ryl` is significantly faster than `yamllint` on large trees. The figure
125
- below is from a 5x5 file-count × file-size matrix with 5 runs per point:
119
+ The figure below times ryl and yamllint over a 5x5 file-count × file-size
120
+ matrix with 5 runs per point:
126
121
 
127
122
  ![Benchmark: ryl vs yamllint scaling (5x5 matrix, 5 runs per point)](https://raw.githubusercontent.com/owenlamont/ryl/main/img/benchmark-5x5-5runs.svg)
128
123
 
@@ -143,9 +138,7 @@ linting and developer automation, especially:
143
138
  Rust tooling for Python development and inspiring the config and API
144
139
  for ryl.
145
140
  - [rumdl](https://github.com/rvben/rumdl) - for giving me another
146
- template to follow for Rust tooling and showing me almost the only dev
147
- tool I was still using after this that wasn't written in Rust was
148
- yamllint (which inspired me to tackle this project).
141
+ template to follow for Rust tooling.
149
142
  - [saphyr](https://github.com/saphyr-rs/saphyr) - ryl's vendored YAML DOM
150
143
  is derived from saphyr, and saphyr's developers were very patient in
151
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.24.0",
4
- "description": "Fast YAML linter inspired by yamllint",
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",