Skip to content

Docs: add yamllint config for testing

Amy Qualls requested to merge docs-7212-yamllint-config into master

Why is this change being made?

Axil wrote:

This changes the way yamllint is run. Previously, it was run as part of the lint 1 2 job and the script was defined in package.json. The thing is, although the test ran and showed as successful (example), that was not the case. yamllint wasn't installed at all in order to run, so I have no idea why running this script with yarn yielded a successful outcome.

So, I moved the test into the Rakefile where we also have a bunch of other YAML linters (custom ones), since it made more sense. It's now run as part of the lint 0 2 job, which runs all the lint tasks. For that to happen, we also had to (really) install yamllint, and this was done in the upstream Docker image we use:

  1. First attempt to just install the package , which installed a very old version that didn't recognize our config file with the rules.
  2. Second attempt that installed a newer package that fits our needs.

Amy wrote:

This MR adds a .yamllint.yml file to the root directory of the www-gitlab-com repository, as described in https://yamllint.readthedocs.io/en/stable/configuration.html to provide the default configuration, and then override it in a second commit to disable the following rules:

These rules are overwhelming the results and are obscuring other issues, so they should be disabled for now.

Related to #7212 (closed) where we are considering implementing yamllint.

Does this MR meet the acceptance criteria?

Assign to DRI

  • Did you assign this change to the correct DRI of the page or information you are changing?

Conformity

Edited by Marcel Amirault

Merge request reports