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

# Using uv (Python)
uvx ryl .

# Using npx (Node.js)
npx @owenlamont/ryl .

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. 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.
  • 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 and check-only (--fix does not modify Markdown). 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 or with --fix.
  • 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.11.0.tar.gz (239.7 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.11.0-py3-none-win_arm64.whl (2.2 MB view details)

Uploaded Python 3Windows ARM64

ryl-0.11.0-py3-none-win_amd64.whl (2.4 MB view details)

Uploaded Python 3Windows x86-64

ryl-0.11.0-py3-none-musllinux_1_2_x86_64.whl (2.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

ryl-0.11.0-py3-none-musllinux_1_2_aarch64.whl (2.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

ryl-0.11.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

ryl-0.11.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

ryl-0.11.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

ryl-0.11.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (3.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

ryl-0.11.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

ryl-0.11.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

ryl-0.11.0-py3-none-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for ryl-0.11.0.tar.gz
Algorithm Hash digest
SHA256 078856d07a4834150c1a21b1522d735533c9d9257d03fab20f1eb81cd02a7297
MD5 9df78ed80bb6b9c327851f0e550679fb
BLAKE2b-256 f00e22a4523c5600d2acca52154e3350f6e3ec07221337c54ddeec3a7a0b69b6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.11.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.2 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.11.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 bc51c05e9a45b314b0ad8f5ef43dae6044cfe27a7cb1196f6bf7e26437120dcc
MD5 9aeeb3b1ad0b6795468cec58bc701bfb
BLAKE2b-256 2a84657a458c19fd4ca0b89471bba46deee3e0b23af3dbed7e8d6dbef320d10b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.11.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.11.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 488ce54e4e90e14d2a0c6518680f77419412442c727e974f7356f73080e5d96c
MD5 bfdc62f3cf19e04b8b24dcbcdb1fa270
BLAKE2b-256 6d28be68ba024e3e1baefa4bcc23dc35ff562a7ee722eae943bf8cecd032acf5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.11.0-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 2.9 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.11.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b90e9cbb5c1f22934277f16de9ace15cda1964c5558230ea43e54e69392c28b9
MD5 7250131021331f863554f6d65c57805a
BLAKE2b-256 cfac4da5f400ba9f4c1310bf0aee17e00e5bba9cc217b3dd20ad45b20799e72d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.11.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9839a249399dedfebf0e1e9e6c5f336d844755d09d714be956cf7c4d0149da08
MD5 87fa3afdcc6f3f830cca739eb54bf2a9
BLAKE2b-256 de4592f8e3ef100c61836d893927fa42a3893fbdda1585dfaf41a4cab3dbd576

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.11.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47099b437745cb95957334a9d5313c68eeda7e006a11ef0c503dad4cfa980263
MD5 3a0360cd41465359dd6226128244b1cb
BLAKE2b-256 a43f6c89fa5d527e1fdcf2f2951570f1f379008e5071980c681729e26d961ace

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.11.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 eabf8e39339b8f6a576f46f65909404cd2ffa5ab04a9fc1daabbd5d19740b53d
MD5 7aa850c7811895033c8f6d70d76b96e6
BLAKE2b-256 6b04169038ef1239177cccf5cb4c553a04d361a7f328bcd5cf337095a28b5417

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.11.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 116e7f04363561450744085b76f120f692755f7787d96dff3b1caa275baf61ba
MD5 378e186504bb18746dd73a83c42fc05e
BLAKE2b-256 86cbf21e99a57cc04d863f56a07dbef7b31aaa7afb8fc527904faa4ca68b5177

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.11.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 86f0780c2c8343802228f48e7a6290bdcfb75898020558b5c5a9181c67a7e6bd
MD5 74c7bfa438439c9d7f79cb675b5cdec4
BLAKE2b-256 4b4efc80091fd02723ad1d1275dd572b27e7d47f35458b356d5e41add03cdf0e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.11.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9d10fc94bfeed49c943bb385cc6468b7bb36dc662f88398dab27e28f98bdd69c
MD5 e0ac0a91869ad5bd87e89950339cf654
BLAKE2b-256 5abd22265ba8724147dcd61c2b1fa19f8190998b242e809ac0b369734c6639f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.11.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 df9b45eb04d0307518c3fd953431b1d2c99c50bddb85597c0633034b3460bbc3
MD5 4cba4220afac37f7faf7d8afb58e8390
BLAKE2b-256 aa57f242f8603b2ac4a14dd2c2a6fbede91b243eef1b76c7865686df8295ae42

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.11.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.5 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.11.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 43d3bbd633d5051c26c6cb53ca99a6bfd8385f049fc920439a89f21c5cdc7b28
MD5 f942ff7c96bd24ee219b2da7c868eb28
BLAKE2b-256 8d093b30211065916512aebf461927506fc1699d2b5dbd71c0ab8522814ee77a

See more details on using hashes here.

Provenance

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