yamllint: Enable all rules

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem

In #359968 (closed) we've started linting YAML in CI.

In order to make the first step easier we've disabled some yamllint rules but added a note to enable them at some point. This point is now.

Proposed solution

Enable all rules in yamllint.

Process

  1. Pick a rule from the the list below
    • Tick the checkbox
  2. Enable or configure this rule
    • Remove this rule from .yamllint to enable it with default values
    • Configure a different value
    • See https://yamllint.readthedocs.io/en/stable/rules.html
  3. Check offenses
    • Run scripts/lint-yaml.sh . $(find . -name "*.yml.example")
  4. Fix the offenses
    • ⚠️ Note that some YAML files a linted with a different config. See https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/yaml.gitlab-ci.yml
    • These rules are marked with ⚠️ because they will produce a lot of offense and are harder to fix
  5. Create MR
    • Link that MR next to the item being fixed below
  6. 🎉

The list

  • braces: disable - !106945 (merged)
    • 🆕 braces: { min-spaces-inside: 1, max-spaces-inside: 1, min-spaces-inside-empty: 0, max-spaces-inside-empty: 0 }
  • colons: disable
  • comments-indentation: disable
  • comments: disable
  • document-start: disable ⚠️
  • empty-lines: disable
  • indentation: disable ⚠️
  • key-duplicates: disable
  • line-length: disable ⚠️
  • new-line-at-end-of-file: disable
  • trailing-spaces: disable
  • truthy: disable

Follow-ups

The item marked with ⚠️ might need more attention and could be resolved in follow-up issues.

Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading