On Sunday, 8 December 2019 21:08:57 CET gregor herrmann wrote:
> - The perl YAML libraries we use add "---\n" at the top of the file,
>   which the used Python libraries in lintian-brush apparently don't
>   do. No idea what is more correct or if it matters at all; I just
>   noted that the removal of the line adds some noise.

It matters if a data line begins with '%' like:

%foo:
 - bar
 - baz

In this case, the YAML parser cannot distinguish between a YAML directive 
(beginning with %) and a data line. See [1] for details

The '---' line is indeed optional, but I think it would be safer and simpler 
for a YAML library to always write YAML doc with '---' at the beginning of the 
file.

Hope this helps

[1] https://yaml.org/spec/1.2/spec.html#id2800401

Reply via email to