> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# YAMLlint

> YAMLlint is a linter for YAML files.

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

<Tabs>
  <Tab title="Web UI">
    <table>
      <tbody>
        <tr>
          <td>
            <strong>Location</strong>
          </td>

          <td>Reviews → Tools → Enable YAMLlint</td>
        </tr>

        <tr>
          <td>
            <strong>Default</strong>
          </td>

          <td>true</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title=".coderabbit.yaml">
    <table>
      <tbody>
        <tr>
          <td>
            <strong>Field</strong>
          </td>

          <td>`reviews.tools.yamllint.enabled`</td>
        </tr>

        <tr>
          <td>
            <strong>Datatype</strong>
          </td>

          <td>boolean</td>
        </tr>

        <tr>
          <td>
            <strong>Default</strong>
          </td>

          <td>true</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>

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

CodeRabbit loads repository `.yamllint.yml` or `.yamllint.yaml` files for this integration if they exist. If not, it passes inline configuration data to yamllint based on the selected review profile.

## 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

## Links

* [YAMLlint Documentation](https://yamllint.readthedocs.io/)
* [Configuration Reference](https://yamllint.readthedocs.io/en/stable/configuration.html)
