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

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.
  • 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.15.0.tar.gz (313.0 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.15.0-py3-none-win_arm64.whl (2.4 MB view details)

Uploaded Python 3Windows ARM64

ryl-0.15.0-py3-none-win_amd64.whl (2.5 MB view details)

Uploaded Python 3Windows x86-64

ryl-0.15.0-py3-none-musllinux_1_2_x86_64.whl (3.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

ryl-0.15.0-py3-none-musllinux_1_2_aarch64.whl (2.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

ryl-0.15.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

ryl-0.15.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

ryl-0.15.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

ryl-0.15.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (3.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

ryl-0.15.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

ryl-0.15.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

ryl-0.15.0-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for ryl-0.15.0.tar.gz
Algorithm Hash digest
SHA256 0f003fb9c2f129a1614bbaee53632a50a16f574578b44f3580709386b52bb349
MD5 cb5765ffdd8790241fd7533b36fcfaba
BLAKE2b-256 67c5ef6bb466b6f69fa1b21bc57ddaa5466a1e1ff2b795baf9762b27967eb10a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.15.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.4 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.15.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 444162d1633613b0d43f6509f0c3e7eec6abfc5c6375fcfdfa03427f1520a9a0
MD5 c942996c05d32c87188c462ae1fb5727
BLAKE2b-256 8105dad3945db7f38006891bc257e849ff502f9b331fca58b39ceaffb0e732ae

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.15.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.5 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.15.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2c4409c9bdccccbd9d38213ff48e4de012601946c860aa51938fb9299e5327cd
MD5 e3375e2973981da789d44b6281f31157
BLAKE2b-256 eb7a9e4f9425621d5b07c1e49005de0aee7f4f4c91eb01b4dc2d0a9651848335

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.15.0-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 3.1 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.15.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6e9e9dd342fead34ae858db068f4763c8885c024c105a0f5c8af36a2b8023bef
MD5 8751d693b728143773b30587fc48fcb6
BLAKE2b-256 79a11913554e8ae3ca2348fcde45ae2fe1e38c8fab36aa182a2c6fa045abded3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.15.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 af9617e9eac538c77a721a28c2735b1084153edfdcf42dd5afb1dc9a67a52a17
MD5 9afcd11bec7f053e321c0198fdf5683b
BLAKE2b-256 4fa9a0fb2eae24a8def971d63d74d99424b25b5af8ac4a33fddf84ca941e178e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.15.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 135163c59fc968b09235322ffbba61ed067e3aada3ae02e8a2de8d3c5e07d90a
MD5 9e1615f90f8b05a0a95217502ae8f1ed
BLAKE2b-256 2d3f8dfc8242f7ceb26ba496e219bb5f34706ac5f327b1f127dea021babb4ba6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.15.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 d5c1d3cfddc3419b62d086cdebd68861ee80bf7791babeaffb1644454cb16f1e
MD5 45c1cef9cf7e7e671c2064713a27dea3
BLAKE2b-256 fcc45418c19fb031f7d7afc9e5c97cbd44606597f58401c6abf1b789c36d4e36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.15.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 0ce5c259e1742b13572b7fbbda52582e5ce9e3cfd3e80ddb9b8c3fdb50c47c9a
MD5 d2ffdd27c055272143b3589a57efbb0c
BLAKE2b-256 4ba60d846754b8ee5137ac67b27b1094de8da9063cc0ebf4af88a57d4e059ccc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.15.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 421967de5dc0340a5e6e7bf513aeee7f27a6058e84576dc7ee8d5c0c4f322e80
MD5 8ebfdc8cc54abf01511109c1a31012b4
BLAKE2b-256 30bd2fe92d84d064ec492db587e69500274be31c971ac2ff8471d902307a8d9d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.15.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 bd98c6f90b3078f6a659f796ff699b16d10e4735c96a3098c7c9edba6a6be1cb
MD5 23bbe6d7421c792b050808c705f94aea
BLAKE2b-256 178bb0f02f7f6074ff902e90ea95497d27d8cc43535e46eb27afd4d18d9ef792

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.15.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b9d1f69592a907cbc8d327f2f322a47781ff1e33bf054679634151119472a261
MD5 633c49517ae8b89ebb7763aaed26949b
BLAKE2b-256 4abdcd67ebb74305c7009905641006375181ca61ddaadb580e7637b022d96137

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.15.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.7 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.15.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7d9003f851c8ebc336e8107e5db9528c947569a5c308514aa266d79714972d88
MD5 f8f09a0e29cea044582d4ce794645f83
BLAKE2b-256 d6fd01155ae44845aa8d7147433a2b1ee329a65cef7512078be8240d4e872cba

See more details on using hashes here.

Provenance

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