| Crates.io | yaml-lint-core |
| lib.rs | yaml-lint-core |
| version | 0.1.0 |
| created_at | 2026-01-10 02:29:48.576111+00 |
| updated_at | 2026-01-10 02:29:48.576111+00 |
| description | Core YAML linting engine - fast, configurable YAML linter inspired by yamllint |
| homepage | |
| repository | https://github.com/hiromaily/yaml-lint-rs |
| max_upload_size | |
| id | 2033321 |
| size | 85,471 |
A fast YAML linter written in Rust, inspired by yamllint.
Built with Claude Code and Cursor.
.yamllint configuration filesyaml-lint-rs is significantly faster than Python yamllint:
| File Size | Lines | yaml-lint-rs | yamllint (Python) | Speedup |
|---|---|---|---|---|
| Small | 112 | 2.1 ms | 61 ms | 29x |
| Medium | 1,100 | 4.8 ms | 104 ms | 22x |
| Large | 11,000 | 12 ms | 532 ms | 43x |
| X-Large | 55,000 | 42 ms | 2,535 ms | 60x |
Benchmarks run on Apple M1, macOS. Results may vary. See benchmarks/ for reproduction.
brew tap hiromaily/tap
brew install yaml-lint
Requires Rust 1.85+ (install from rustup.rs):
# Clone or navigate to the project directory
cd yaml-lint-rs
# Build the project
cargo build --release
# The binary will be at ./target/release/yaml-lint
cargo install --path cli
# Lint a single file
yaml-lint file.yaml
# Lint multiple files
yaml-lint file1.yaml file2.yaml
# Lint all YAML files in a directory
yaml-lint src/
# Lint with specific config file
yaml-lint -c .yamllint file.yaml
# Standard human-readable output (default)
yaml-lint file.yaml
# Colored output (coming soon)
yaml-lint -f colored file.yaml
# Machine-parsable output (coming soon)
yaml-lint -f parsable file.yaml
# Use default preset (strict)
yaml-lint -d default file.yaml
# Use relaxed preset
yaml-lint -d relaxed file.yaml
# Treat warnings as errors
yaml-lint --strict file.yaml
# List files that would be linted
yaml-lint --list-files src/
Create a .yamllint or .yamllint.yml file in your project root:
# Extend a preset
extends: default
# Configure individual rules
rules:
trailing-spaces: error
line-length:
max: 120
document-start: disable
indentation:
spaces: 2
# Ignore patterns
ignore: |
/vendor/
*.generated.yaml
line-length - Enforces maximum line length
max (default: 80)document-start - Requires or forbids --- at document start
present (true/false)colons - Validates spacing around colons in mappings
max-spaces-before (0), max-spaces-after (1)key-duplicates - Prevents duplicate keys in mappings
indentation - Validates consistent indentation
spaces (2/4/consistent), indent-sequencesAdditional 17 rules planned for full yamllint compatibility:
--strict)--strict flag# Bad
key: value
# Good
key: value
# Bad (> 80 characters)
key: this is a very long value that exceeds the maximum line length of eighty characters
# Good
key: shorter value
# or use multiline
key: |
this is a very long value
split across multiple lines
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT
Inspired by yamllint by Adrien VergΓ©.