Source: https://yamllint.readthedocs.io/en/latest/rules.html. Archived 2026-10-25 as a summary in
plain words (the fetch tool would not reproduce the page verbatim). The rules are stable across
versions 1.1-1.31.
- comments: checks comment formatting.
require-starting-space (default true): a space after #.
min-spaces-from-content (default 2): spaces between content and an inline (end-of-line) comment,
"to keep inline comments visually separate from code". ignore-shebangs.
- comments-indentation: a comment must be indented like the content around it (a comment at
column 0 inside a nested list fails; aligned with the items passes).
- line-length: maximum line length (default 80); options to allow long unbreakable words (URLs).
- truthy: only allowed truthy values (default
true/false); flags yes/no/on/off.
- document-start: requires or forbids the
--- document start marker.
- indentation: consistent indentation (spaces, a fixed width, sequences indented or not).
- key-duplicates: flags a mapping key that appears twice (YAML parsers silently keep the last).