4 releases (2 breaking)
Uses new Rust 2024
| 0.3.1 | Oct 12, 2025 |
|---|---|
| 0.3.0 | Oct 12, 2025 |
| 0.2.0 | Sep 10, 2025 |
| 0.1.0 | Sep 7, 2025 |
#474 in Development tools
347 downloads per month
290KB
8K
SLoC
ryl
ryl - the Rust Yaml Linter is intended to ultimately be a drop in replacement for yamllint. It's only just begun and isn't ready for use yet though. I'll update and post info as it becomes ready.
Usage
ryl accepts one or more paths: files and/or directories.
Basic:
ryl <PATH_OR_FILE> [PATH_OR_FILE...]
Behavior:
- Files: parsed as YAML even if the extension is not
.yml/.yaml. - Directories: recursively lints
.ymland.yamlfiles.- Respects
.gitignore, global git ignores, and git excludes. - Does not follow symlinks.
- Respects
Exit codes:
0when all parsed files are valid (or no files found).1when any invalid YAML is found.2for CLI usage errors (for example, no paths provided).
Examples:
# Single file
ryl myfile.yml
# Multiple inputs (mix files and directories)
ryl config/ another.yml
# Multiple directories
ryl dir1 dir2
# Explicit non-YAML extension (parsed as YAML)
ryl notes.txt
Help and version:
ryl -horryl --helpshows auto-generated help.ryl -Vorryl --versionprints the version.
The CLI is built with clap, which auto-generates --help and --version.
Configuration
- Flags:
-c, --config-file <FILE>: path to a YAML config file.-d, --config-data <YAML>: inline YAML config (highest precedence).--list-files: print files that would be linted after applying ignores and exit.-f, --format,-s, --strict,--no-warnings: reserved for compatibility.
- Discovery precedence:
inline
--config-data>--config-file> envYAMLLINT_CONFIG_FILE(global) > nearest project config up the tree (.yamllint,.yamllint.yml,.yamllint.yaml) > user-global ($XDG_CONFIG_HOME/yamllint/configor~/.config/yamllint/config) > built-in defaults. - Per-file behavior: unless a global config is set via
--config-data,--config-file, orYAMLLINT_CONFIG_FILE, each file discovers its nearest project config. Ignores apply to directory scans and explicit files (parity). - Presets and extends: supports yamllint’s built-in
default,relaxed, andemptyviaextends. Rule maps are deep-merged; scalars/sequences overwrite.
Dependencies
~11–16MB
~349K SLoC