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.0.tar.gz (429.2 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.0-py3-none-win_arm64.whl (3.0 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

ryl-0.18.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

ryl-0.18.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

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

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

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

Uploaded Python 3manylinux: glibc 2.17+ i686

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

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

ryl-0.18.0-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.0.tar.gz.

File metadata

  • Download URL: ryl-0.18.0.tar.gz
  • Upload date:
  • Size: 429.2 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.0.tar.gz
Algorithm Hash digest
SHA256 c51e8a076814df1657456b38c1a894413f7c10220e4dc932d89b97e5045a144f
MD5 770c1b3dab014e250d768455d1501435
BLAKE2b-256 25892c985c42e4efbea137dd6b2e24f12572bc61e2dff19ac724bc2551f27f81

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0.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.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: ryl-0.18.0-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.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 ef739c494241dc92b5c6cc8e0d03011df5f2e30213a2a10638f25873366decf4
MD5 580ebf989fa3a3ff12e3b8f0ca0490b7
BLAKE2b-256 7aa577214c00b8a7e012894cc88ddcb6e0ea601967f6cc7638d06edd6b22e48d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: ryl-0.18.0-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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 80f8572e5b3c8d13a3cec97952f01890db78b4c9d658f62a0ce500228b607f74
MD5 92c9a99001778c5e0f1371f08c51b3b9
BLAKE2b-256 46704055e1a64f9b0212decadc3b32a387c6a5f78f043c5aeb930e844a8211e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: ryl-0.18.0-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.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dcf79ae080b49191e7c09def02b8a79cd2449291d1247bcd837def5bb7a05b88
MD5 55bf884d48b17ae49d8ac1138754ec02
BLAKE2b-256 36d7b634a5598263406dadf14e817cffc92bf4fe9d7db70137903eb07e63fdd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for ryl-0.18.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2dc3338b9ac9e65dd547c5833c88c2c68ffdbe6dadc2a9d1a9cca2aa7f7b9c71
MD5 3cb2039151f6fdf38ee3e9e0d0e8b91b
BLAKE2b-256 c822eaa2214bc0cc75ec23569d301ca1570a1b38671226a86734ca4473bf8ec3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ryl-0.18.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb7834195878cca22ea08464dcfa4f9882f984db7417e3dc44bd2cd6e15e820b
MD5 3035649357567e8b940b2e45acf3ce7c
BLAKE2b-256 a8c84590885a7f71564843a26d3910912acbaffb5b2ca936f5f3e9ef07dee235

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for ryl-0.18.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 60823c10e56197747a6530bdc68e0c13a6ea800035515f723044a5e0141f0f27
MD5 c122ca69bd1dce9f8950a170fd193ccb
BLAKE2b-256 979cd229c5f15e24f4b09ef8bd1a6b90b4774a98e0512a1d9a15d990e4821c20

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for ryl-0.18.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 7851c12c975fbf2b41adf858a2fce96760b4b10a97e23895b7a8967f5785adc0
MD5 777cee276db6723fa10fd44a9483d36c
BLAKE2b-256 750ee90b95319ed42331090a12f40ef7f623ecad0c0158a75fb76268d8d1d1bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ryl-0.18.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 78153e071fe722bcc397fab928b2ca061bc7ad7da946731bc73acf9e6ea29f03
MD5 92144939a74fe660bbf20d921d54154e
BLAKE2b-256 87953f278bbcf7ce838095be3f2a7392e437a21ef9f22223b544baaeab2d80c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for ryl-0.18.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 4691a653e448d960fa0ee54398d53e21cf3dd790b1350557311d5fc245cc1cc9
MD5 7502d86720a93753065edc6b48e764b7
BLAKE2b-256 8cc792613de61a1ec76a5cb04a26e3b4a7e0e57fdde018c09d5ddf2e49e97c5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ryl-0.18.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9b908e2293ab3ac902340d469a476c185d83484e4550031d7786759a6516b5b4
MD5 c08e43c308eb7217d08d9472df24f469
BLAKE2b-256 d98a0306e82926062b089c55c9b80533c9c03be44200ad2b4fae3d7981e30c20

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: ryl-0.18.0-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.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e041a19d3e696c92d5e608b13d5c1ffdcb12817116118b5df3bb16b10c6f1ea7
MD5 b9f14b411932d3dc20066a9dc1a1d0ff
BLAKE2b-256 0e67fd201813795972f1893a01dcc72e5756d0031f7afba0b406c57eb9fd74c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ryl-0.18.0-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