Issue with the yml linter of the pre_commit check

What happens

I just uploaded my first MR but it was closed because my yml file started with “—” but the problem is I couldn’t pass the pre_commit pipeline without it.

What do you understand or find about that problem

It seems the pre_commit pipeline are using the yamllint to check the style of the yml

Did you try any workaround? What did you do?

I downloaded the linter used in the pipeline and start checking my yml and others already merged, the result was the same for all, a warning about the document should start with “—”.

(Optional) Why does the workaround fail?

The pipeline passed succesfully my yml starting with “—”, I have no trailing spaces, my file have endline, the only problem was the start of the file.

Evidences

As you can see this is a valid yml for the linter, the file starts with “—”.

Now the warning jumps because the ausence of “—” as document-start, this is the same warning that appear when you upload your code and the pre_commit pipeline start checking.

Not only in my yml jumps the warning, in every already merged yml files happpen if it does not start with “—” so I assume that in the present the whole yml files of the repository can’t pass the pre_commit pipeline because of the current linter

I need help with

Whatever is going on, it’s so confusing and I can’t upload any solutions because of this, when my document starts with “—” the pipeline pass and I can do MR but it’s closed for the same reason, without the “—” i can’t even pass the pre_commit pipeline. Thank you for the help.

Hi,

Code files and files with extensions .lst and .yml must end with an empty line. Please give me the link where the pre_commit gives you an error.