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. 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.12.0.tar.gz (255.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.12.0-py3-none-win_arm64.whl (2.3 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

ryl-0.12.0-py3-none-musllinux_1_2_aarch64.whl (2.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

ryl-0.12.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.12.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

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

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

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

Uploaded Python 3manylinux: glibc 2.17+ i686

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

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

ryl-0.12.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

ryl-0.12.0-py3-none-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: ryl-0.12.0.tar.gz
  • Upload date:
  • Size: 255.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.12.0.tar.gz
Algorithm Hash digest
SHA256 afb4e081e128a7b11c90ec066b24832e267ef288d6a90fff4e09f20320030b38
MD5 e02e958c2eb28f9ece5dc86b8760ad3e
BLAKE2b-256 d77ea15821fb8fae8cab7893c41eb14c7d54ccf3e357c0f5460d38b87e3517e5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.12.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.3 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.12.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 6b7a66c2170ef1a07f98e2ab96c1cc5314cc9ef98c0a8cfaeae01a00a9b72134
MD5 bd2bad0ea69d22bb1f9de3773e1e8cec
BLAKE2b-256 1a2690b32aee6f7f22452391995077f62aa91d2cb08a3ca00ec405f317e911f8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.12.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.12.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 391a2414bf2b9fd35be2dafec4280238af08e3ca49682e37645164376e9dc703
MD5 d028ab66514fcac23d3c4a0d7fc49675
BLAKE2b-256 2eb8a3471a986d27cd4a74002a359af283e49e9fa4acdb116bd12645355040a9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.12.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.12.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 97cbf8e117a444d5be46c72e0c25bb63e3aaee92bc4ce7bdf25bc4d3776cc7bf
MD5 9653c56ed6296fbe7866d9c6e021ccf3
BLAKE2b-256 0ed5428b2a4816fd2a5aed1da66ab1d890d170d456c434b1038e8d7a6522c0f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.12.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5117538b0967f7d07203d0088f07be30e851edc0e74f99993a1508ca5729c866
MD5 97ffc410a4ee18ee76bd8450df25b96f
BLAKE2b-256 12a86b7af36f3ae4b6877c02b02c65f5c523322c5d5e236d1b14f99bcb8d3d4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.12.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 764ddc35f9388cb3753184e6d20fa7c1f2f412835eea7bbddf388c845d90f3bf
MD5 62e8b9d974fe1c8b8ec9c4a5fb524977
BLAKE2b-256 83b2f5688dd96fbc240b4054aeceb9bf1e499fcb6acecf8aefd329350b0477c8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.12.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 eb1fc7c8e31c6e02087a33bd4e43d4a91969be38d0dda1c1e7e0f4734cab86d4
MD5 7fe5486599c97bddbd9991a62268c264
BLAKE2b-256 62b976c8e97e387880c07465dfc1566cd1407f032336ebb31a70afdc32c1c53b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.12.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 d6eabd2190b6c2eedb3e9657a3ceb2b5df6d59e85bc9ac6ed67b54880b8cc4a2
MD5 a2c84ae6e0cb163a8c0f6c0b5f62ca68
BLAKE2b-256 c7939fe3eb83f103d6fe5dfe9672eb3561df7d17b896594dbf1ebeaf218951b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.12.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3f363f6f93635671a5c327c813e300f38c05df0ad62b8517c20985a25f71f4b3
MD5 332b443e145a54c13eebdd26cf230af4
BLAKE2b-256 19f1a5faa33c735a999329290c7ca25ce8e1ec06fd5d6fa90d31ef5379eaa7ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.12.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9c85a3a50bd7a014680b6ba35e0f66009c9b0ab562cbee2efdbb7e6e4490aa00
MD5 2ccd1ba2431596417e57fdd08f765214
BLAKE2b-256 dc7325bd5869fd1aecd17c5fcd8e0bab5df522633a130549fb1da7ac5a92b005

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ryl-0.12.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 75543bf57323906fbb591dff30f69bceb72a3b02c24426f4fadbbe8f02416fa7
MD5 f6d15d699dfa34d647eb65d000d1870b
BLAKE2b-256 3695be5a4968c634d31b46afd18c6649b690633ae3fb0079649dd19238f947ad

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ryl-0.12.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.6 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.12.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c311d6e910a87b206546f3477b7b285d712638fdc89298e09497f99d223fe7f0
MD5 7c3063df70cb25ea3162296e456fcd11
BLAKE2b-256 dbc7c879ea202b09a9c06f5da4831c2106dc3286f99800abd8ef6bfc4271536f

See more details on using hashes here.

Provenance

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