Skip to main content

A linter for YAML files.

yamllint does not only check for syntax validity, but for weirdnesses like key repetition and cosmetic problems such as lines length, trailing spaces, indentation, etc.

CI tests status Code coverage status Documentation status

Written in Python.

Documentation

https://yamllint.readthedocs.io/

Overview

Screenshot

yamllint screenshot

Installation

Using pip, the Python package manager:

pip install --user yamllint

yamllint is also packaged for all major operating systems, see installation examples (dnf, apt-get…) in the documentation.

Usage

# Lint one or more files
yamllint my_file.yml my_other_file.yaml ...
# Recursively lint all YAML files in a directory
yamllint .
# Use a pre-defined lint configuration
yamllint -d relaxed file.yaml

# Use a custom lint configuration
yamllint -c /path/to/myconfig file-to-lint.yaml
# Output a parsable format (for syntax checking in editors like Vim, emacs...)
yamllint -f parsable file.yaml

Read more in the complete documentation!

Features

Here is a yamllint configuration file example:

extends: default

rules:
  # 80 chars should be enough, but don't fail if a line is longer
  line-length:
    max: 80
    level: warning

  # don't bother me with this rule
  indentation: disable

Within a YAML file, special comments can be used to disable checks for a single line:

This line is waaaaaaaaaay too long  # yamllint disable-line

or for a whole block:

# yamllint disable rule:colons
- Lorem       : ipsum
  dolor       : sit amet,
  consectetur : adipiscing elit
# yamllint enable

Specific files can be ignored (totally or for some rules only) using a .gitignore-style pattern:

# For all rules
ignore: |
  *.dont-lint-me.yaml
  /bin/
  !/bin/*.lint-me-anyway.yaml

rules:
  key-duplicates:
    ignore: |
      generated
      *.template.yaml
  trailing-spaces:
    ignore: |
      *.ignore-trailing-spaces.yaml
      /ascii-art/*

Read more in the complete documentation!

License

GPL version 3

Release files for yamllint 1.38.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yamllint 1.38.0
File Size Uploaded
yamllint-1.38.0.tar.gz 142.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yamllint 1.38.0
File Interpreter ABI Platform
yamllint-1.38.0-py3-none-any.whl Python 3 none any Details

Total release size: 211.4 kB

Release files / yamllint-1.38.0.tar.gz

Download URL yamllint-1.38.0.tar.gz
Size 142.4 kB
Tags Source
SHA-256 checksum
How to use checksums
09e5f29531daab93366bb061e76019d5e91691ef0a40328f04c927387d1d364d
BLAKE2b-256 checksum
How to use checksums
28a08fc2d68e132cf918f18273fdc8a1b8432b60d75ac12fdae4b0ef5c9d2e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 13, 2026.

Transparency log

Release files / yamllint-1.38.0-py3-none-any.whl

Download URL yamllint-1.38.0-py3-none-any.whl
Size 68.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc394a5b3be980a4062607b8fdddc0843f4fa394152b6da21722f5d59013c220
BLAKE2b-256 checksum
How to use checksums
0592aed08e68de6e6a3d7c2328ce7388072cd6affc26e2917197430b646aed02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.38.0 This release

2 release files

1.37.0

2 release files

1.36.2

2 release files

1.36.1

2 release files

1.36.0

2 release files

1.35.1

2 release files

1.35.0

2 release files

1.32.0

2 release files

1.31.0

2 release files

1.30.0

1 release file

1.29.0

2 release files

1.28.0

2 release files

1.27.1

1 release file

1.27.0

1 release file

1.26.3

1 release file

1.26.2

1 release file

1.26.1

1 release file

1.26.0

2 release files

1.25.0

2 release files

1.24.2

2 release files

1.24.1

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.22.1

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.20.0

2 release files

1.19.0

2 release files

1.18.0

2 release files

1.17.0

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.1

2 release files

1.11.0

2 release files

1.9.0

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

1 release file

1.4.0

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page