Skip to content

📃 yamllint-rs

yamllint-rs is a fast, high-performance YAML linter written in Rust, designed as a drop-in replacement for the Python-based yamllint.

🛠 Installation

You can install yamllint-rs using Cargo, or run it via Docker.

cargo install yamllint-rs
docker run --rm -v $(pwd):/work -w /work yamllint-rs:latest --recursive .

⚙ Config

yamllint-rs is compatible with the standard yamllint configuration format. It automatically discovers and uses .yamllint files in the project root.

.yamllint

---
extends: default

rules:
  line-length:
    max: 120
    allow-non-breakable-words: true

📝 Usage

CLI Commands

1. Lint a specific file or folder

yamllint-rs file.yaml

2. Lint all YAML files recursively in the current directory

yamllint-rs --recursive .

3. Automatically fix autofixable violations

yamllint-rs --fix .

🔗 References