yamllint: Enable all rules
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
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
- Pick a rule from the the list below
- Tick the checkbox
- 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
- Remove this rule from
- Check offenses
- Run
scripts/lint-yaml.sh . $(find . -name "*.yml.example")
- Run
- 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
-
- Create MR
- Link that MR next to the item being fixed below
🎉
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
Edited by 🤖 GitLab Bot 🤖