Skip to main content
YAMLlint is a linter for YAML files that checks both for syntax validity and cosmetic problems like line length, trailing spaces, indentation, etc.

Files

YAMLlint will run on files with the following extensions:
  • .yaml
  • .yml

Configuration

Enable YAMLlint

Review > Tools > Enable YAMLlint
true
YAMLlint is a linter for YAML files.

Features

YAMLlint performs several checks:

Syntax checks

  • YAML validity
  • Document structure

Cosmetic checks

  • Line length limits
  • Trailing whitespace
  • Indentation consistency
  • Empty lines
  • Comments formatting

Configuration File

YAMLlint can be configured using a .yamllint.yml or .yamllint.yaml configuration file in your repository root. The configuration file allows you to:
  • Enable/disable specific rules
  • Customize rule parameters
  • Ignore certain files or directories

When we skip YAMLlint

CodeRabbit will skip running YAMLlint when:
  • YAMLlint is already running in GitHub workflows.

Ignored rules

The following YAMLlint rules are automatically ignored (noisy whitespace/indentation-only rules):
  • trailing-spaces - extra spaces at end of line
  • indentation - spaces don’t line up
  • new-line-at-end-of-file - new line at end of file
  • commas - commas in lists
  • line-length - line length limits
  • document-start - document start requirements

Profile behavior

CodeRabbit uses different YAMLlint rule sets based on the review profile:
  • Chill Mode: Uses the relaxed rule set
  • Assertive Mode: Uses the default rule set