Skip to content

yamllint: Enable and configure `braces` rule

What does this MR do and why?

Enforce braces to be used with a single space inside. Empty braces don't have a space:

  good: { this_is: ok }
  empty: {}  # Also OK

  bad: {this_is: too_little}
  also_bad: {  this_is: too_much  }
  empty: { }  # Also bad

Contributes to #385693.

How to set up and validate locally

scripts/lint-yaml.sh . $(find . -name "*.yml.*" -or -name "*.yaml.*" | grep -vE '\.(erb|gz|bz2|swp|swo)$')

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports

Loading