Skip to main content

Fast YAML linter inspired by yamllint

Project description

ryl

ryl - the Rust YAML linter - is intended to ultimately be a drop-in replacement for yamllint. It is usable today, but parity and edge-case behaviour are still maturing.

Full documentation lives at https://ryl-docs.pages.dev/.

Compatibility note

  • ryl aims to match yamllint behaviour and includes many parity tests.
  • ryl uses the granit-parser parser stack, while yamllint uses the PyYAML parser stack.
  • granit-parser and PyYAML do not always agree on which files are valid YAML.
  • ryl targets YAML 1.2 strictly. yamllint defaults to YAML 1.1 semantics, so bareword booleans like yes / no / on / off (and case variants) are plain strings in ryl and booleans in yamllint. Leading-zero integers like 0755 are decimal in ryl and octal in yamllint. The same 1.2 semantics also apply when ryl parses .yamllint configuration files inherited from yamllint. See the YAML version compatibility page for the practical implications.

Quick start

ryl enables no rules by default, so it needs a configuration that turns rules on. -d 'extends: default' opts into yamllint's standard rule set for a one-off run; for a project, drop a .ryl.toml at the root (see Configuration).

# Using uv (Python)
uvx ryl -d 'extends: default' .

# Using npx (Node.js)
npx @owenlamont/ryl -d 'extends: default' .

For prek / pre-commit integration, see ryl-pre-commit.

Installation

uv tool install ryl                 # uv
npm install -g @owenlamont/ryl      # npm
pip install ryl                     # pip
cargo install ryl                   # cargo
pixi global install ryl             # conda-forge

Status and scope

  • All 23 yamllint rules are implemented, plus a ryl-only tags rule (forbids unsafe and non-portable YAML tags; configured in TOML only). The current rule reference and per-rule pages are at https://ryl-docs.pages.dev/rules/.
  • Auto-fixing (--fix) is supported for braces, brackets, commas, comments, comments-indentation, new-line-at-end-of-file, new-lines, and quoted-strings. The set of rules that may apply fixes is configurable via the TOML [fix] table.
  • --diff previews those safe fixes as a unified diff on stdout instead of writing them (modelled on ruff check --diff); it is mutually exclusive with --fix, works with stdin, and exits 1 iff some file would change.
  • TOML is the recommended configuration format and supports ryl-only features that have no upstream equivalent: the [fix] table, [per-file-ignores], and rule options such as allow-double-quotes-for-escaping.
  • TOML assigns each file a source kind via the [files] table (yaml = [...], markdown = [...]). The legacy yaml-files key is YAML-only; in TOML use [files].yaml.
  • YAML embedded in Markdown (front matter and fenced yaml/yml blocks) can be linted by listing globs under [files].markdown; diagnostics map back to the Markdown file. It is off by default; --fix writes safe fixes back into the embedded blocks and --diff previews them at the host-file level. See https://ryl-docs.pages.dev/markdown/.
  • yamllint-style YAML configuration is also accepted (.yamllint, .yamllint.yml, .yamllint.yaml) for drop-in compatibility, including the built-in default, relaxed, and empty presets via extends. An existing yamllint configuration can be converted with ryl --migrate-configs --migrate-write.
  • --list-files prints the files ryl would lint (after ignores and config discovery) and exits, without running rules. --no-warnings suppresses warning-level diagnostics in the output. --strict turns a warning-only run into exit code 2.
  • Pass - as the input to read YAML from stdin (ruff convention). Add --stdin-filename <PATH> so diagnostics, project-config discovery, and path-based filtering (yaml-files, per-file-ignores, per-rule ignore) use that filename. Without it, diagnostics are labelled <stdin>, config is anchored at the current working directory, and all path-based filtering is skipped so every enabled rule runs. - cannot be combined with other inputs; --fix cannot read from stdin, but --diff can.
  • ryl server runs ryl as a Language Server (LSP) over stdio, giving editors inline diagnostics, a source.fixAll.ryl code action, and formatting (= apply safe fixes). It complements Red Hat's yaml-language-server rather than replacing it, and is built in by default (a minimal binary without it builds with cargo install ryl --no-default-features). See https://ryl-docs.pages.dev/editor-integration/.
  • Run ryl --help for the authoritative CLI reference.

For installation walkthroughs, configuration presets, and per-rule documentation, see the docs site.

Performance

ryl is significantly faster than yamllint on large trees. The figure below is from a 5x5 file-count × file-size matrix with 5 runs per point:

Benchmark: ryl vs yamllint scaling (5x5 matrix, 5 runs per point)

The benchmark script is in scripts/benchmark_perf_vs_yamllint.py; run it with --help for the full option set.

Acknowledgements

This project exists thanks to the tooling and ecosystems around YAML linting and developer automation, especially:

  • yamllint - for giving me the shoulders to stand on and the source of many of the automated tests that ryl uses now to check for behaviour parity. Copying the behaviour of an existing tool is infinitely easier than building one from scratch - there'd be no ryl without yamllint.
  • ruff - for showing the power of Rust tooling for Python development and inspiring the config and API for ryl.
  • rumdl - for giving me another template to follow for Rust tooling and showing me almost the only dev tool I was still using after this that wasn't written in Rust was yamllint (which inspired me to tackle this project).
  • saphyr - ryl's vendored YAML DOM is derived from saphyr, and saphyr's developers were very patient in showing some of the nuance and complexity of parsing YAML which I was embarrassingly ignorant of when starting ryl.
  • granit-parser - a saphyr-parser fork with comment and style metadata that ryl uses for event-stream parsing.
  • esbuild and biome - for providing the "binary wrapper" blueprint for distributing high-performance native tools via NPM.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ryl-0.18.1.tar.gz (435.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ryl-0.18.1-py3-none-win_arm64.whl (3.0 MB view details)

Uploaded Python 3Windows ARM64

ryl-0.18.1-py3-none-win_amd64.whl (3.2 MB view details)

Uploaded Python 3Windows x86-64

ryl-0.18.1-py3-none-musllinux_1_2_x86_64.whl (3.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

ryl-0.18.1-py3-none-musllinux_1_2_aarch64.whl (3.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

ryl-0.18.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

ryl-0.18.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

ryl-0.18.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (4.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

ryl-0.18.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (4.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

ryl-0.18.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (3.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

ryl-0.18.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

ryl-0.18.1-py3-none-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file ryl-0.18.1.tar.gz.

File metadata

  • Download URL: ryl-0.18.1.tar.gz
  • Upload date:
  • Size: 435.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ryl-0.18.1.tar.gz
Algorithm Hash digest
SHA256 297495f41fb5dc289c74544091ffdf720e3246b8c4bcb39d930329a6e637df4a
MD5 9b218b0cc81b3b85d7b9db7ac9b2316d
BLAKE2b-256 2c887262297b68eb331c1f1cf5c868e04412036b22826509731d5af63a1cc880

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1.tar.gz:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-win_arm64.whl.

File metadata

  • Download URL: ryl-0.18.1-py3-none-win_arm64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ryl-0.18.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 587a6b7aef0fd333292f13a7cb4a19290f3c9d96b5873af246eaa2948dd7dd94
MD5 ca352f272bee88fff7d7620dff8e9fb4
BLAKE2b-256 c1cc6deda32171c84d879c6bdae4f5c1bb983d5eeceb6fa394bb0d2a76e00ff1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-win_arm64.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: ryl-0.18.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ryl-0.18.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a8fdc2c26b7c8518f4a1e8f629e3bf30e7a1c93b966d4a54f19223fb6227aefa
MD5 0e074ab247e5c999c7b486c6c803c55e
BLAKE2b-256 9b72543af1418246b5ccf21e019fdd0e688a828b08fbe5b6f5ad25d22b2ddf7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-win_amd64.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: ryl-0.18.1-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ryl-0.18.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 af391aee16b95b2e66af9cd6012312254135183ad92bae537368e1c2be52e536
MD5 e1cba0bbe7b6e0e432f3b1d726719a75
BLAKE2b-256 3f523ea2adf0078183445509b324d5a8f6f241dde5e986a38742e464dba6e1fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-musllinux_1_2_x86_64.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for ryl-0.18.1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 619247e105444a6b283326a762ebca39463c71bbe96045cd0b474f27dadb36cc
MD5 0cf6c801738c35cdee0c74c67da84a2a
BLAKE2b-256 66b1d5c7e6e0b9ededf5c73e537730b4f72334028db27331842d8af55aebcd30

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-musllinux_1_2_aarch64.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ryl-0.18.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eb5a1b2343bd3bf47eddba83cebeb2437ed733b7de8555f0da01c803357ca87c
MD5 1bf4e7872d90c5d99afa3637d745faeb
BLAKE2b-256 a22c56b7cff052aeb260d2f5f8825adf20442f1535ef5b9dcf4daf45090cc516

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for ryl-0.18.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 5065975fd64e73819a0f19f12c3d46734249799e43d96bdc14c99f86478d4659
MD5 fe39bb0f67885679a20e8f28dee0ef6d
BLAKE2b-256 6524cd63503860c20d6ab00342351041c30eb3f56ab4a40ee5039dda45b26354

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for ryl-0.18.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 752a3470ca661b560246e8dc1916d0acb2b53f5064d52318cc89cd290ca48d85
MD5 f980dcc38c3526be2587a279a27fe7c1
BLAKE2b-256 24b416e86fc6b6b7d40a537e38e769cad17a4c6209aac628646dcaa5519568db

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ryl-0.18.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2e0f1bf590c7274ee1b4202f24bcbad19891f6b903b5728e5104ac65ab92da4f
MD5 9c202412c842e856ebdef45d63cb0d11
BLAKE2b-256 8d29ea170dc98d05c4d1b25d49d1ad4f21cd08cc955de4ac9436186557efadce

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for ryl-0.18.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 82876a4e40bb9412cb6eaf8a21e581d5b30ad84051304ac3405f923d0004ebc0
MD5 ed2b1f00087e90d8a69117c8e24370e4
BLAKE2b-256 d82e1a55bac748b6273fd3536f06e4d64172eaa6e154485cee54a21a99ad6ea3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ryl-0.18.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c2f32bfa2e10b3d75929e7b4126954fa4883bba33a369c2ec9c884f9f6c2ad65
MD5 62fe80f249365450e5f229440bf25192
BLAKE2b-256 bacf70137f5d5e683b61621f8fbb4e2c5efac25480e93e17ad2d0c46c126dab1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ryl-0.18.1-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: ryl-0.18.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ryl-0.18.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d3ec34c0305f491ed8a72813c614b06215a22c3482a108e698b6249d18c71a2
MD5 158399f3de870d6b2d8d4363b829a11c
BLAKE2b-256 4f9f7850c4a7789b6378b495faa3e4edba729bf328489264f8a2761cc5e1c485

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.1-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on owenlamont/ryl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page