CI linter should ignore BOM
Summary
The CI/CD Pipeline linter does not handle the UTF-8 Byte-Order Mark (BOM) correctly. If a stage:
definition is on the first line of a file with a BOM the linter will report This GitLab CI configuration is invalid: jobs config should contain at least one visible job.
Steps to reproduce
- Create a UTF-8 text file with BOM; define
stage:
on the first line - Upload to a project as
.gitlab-ci.yml
- Check that linter reports
jobs config should contain at least one visible job
Example Project
https://gitlab.com/gitlab-gold/all-base
What is the current bug behavior?
CI file is incorrectly rejected because no jobs are visible
What is the expected correct behavior?
The file should work as normal, since the BOM is invisible to our editors / file viewers.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Happens on Gitlab.com: GitLab Enterprise Edition 14.9.0-pre 329cae13