Yamllint Coding Style Validation for .gitlab-ci.yml
Adopting Yamllint as Yaml Style Guidelines for
It would seem that it would be useful to use Yamllint (https://yamllint.readthedocs.io/) for processing
.gitlab-ci.yml files to ensure consistency across projects (I already use for linting yaml in other projects and linting yaml for Ansible).
It is a relatively straightforward inclusion to existing CI processes:
yaml-lint: image: sdesbure/yamllint:latest script: - yamllint .
Therefore, you would gain consistency and overall awareness of linting of yaml files. At the moment, I see that the document-start rules are not followed inside the templates? And I can see a number of inconsistencies with indentation also.
If you want to maintain separate rules for internal projects (maybe extending line-length) then that can easily be done, but seeing as so much yaml is written it may be nice to include expectations for how yaml is styled.