Skip to content

Make all yaml inside project root compliant with Yamllint

Summary

The Yaml across the project root is inconsistent in style and formatting. This should follow a consistent style making it easier to successfully lint yaml, and also making it easier to read/debug when required, refer to https://yamllint.readthedocs.io.

This is linked to #60283 (moved) however, I have separated as not part of project templates. So separated the issue.

Steps to reproduce

Either you can run yamllint yourself (install from pip or https://yamllint.readthedocs.io) or using the following docker container inside .gitlab-ci.yml.

yaml-lint:
  image: sdesbure/yamllint:latest
  script:
    - yamllint .

What is the current bug behavior?

.codeclimate.yml

will@ubuntu $ yamllint .codeclimate.yml
.codeclimate.yml
  9:7       error    wrong indentation: expected 8 but found 6  (indentation)
  13:3      error    wrong indentation: expected 4 but found 2  (indentation)
  24:1      error    wrong indentation: expected 2 but found 0  (indentation)

.haml-lint.yml

.haml-lint.yml
  152:22    warning  too few spaces before comment  (comments)

.pkgr.yml

.pkgr.yml
  6:5       error    trailing spaces  (trailing-spaces)
  7:33      error    trailing spaces  (trailing-spaces)

.rubocop_todo.yml

.rubocop_todo.yml
  690:1     error    duplication of key "Metrics/LineLength" in mapping  (key-duplicates)

What is the expected correct behavior?

You should see nothing...

will@ubuntu $ yamllint .codeclimate.yml
will@ubuntu $

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

Output of checks

This is just a formatting error. It has no effect of the running or parsing of yaml.

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

I will make a merge request in the next few minutes and update this.

Edited by Will Hall