google / yamlfmt

An extensible command line tool or library to format yaml files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs request: `best_width`, YAML library

jamesbraza opened this issue · comments

From https://github.com/google/yamlfmt/blob/main/docs/config-file.md#note-on-max_line_length:

It's not perfect; it uses the best_width setting from the yaml library

Can I request an addition to the docs:

  • What yaml library is being referred to here
  • Link docs on best_width

The library being referred to here is the library mentioned in the beginning section, yaml.v3. There is no other yaml library in the repository. I can reword it to reiterate that it is the same library referred to in the section above.

If there are docs on best_width, I can't find them. The feature existed in the library because it was a Go port of a C library that had the feature in there. I can't find any docs written about it from the C library (maybe they are in the libyaml-docs debian package, but can't find them anywhere on the internet I can link to them). The Go port doesn't have any docs written about them either, because the feature was not configurable through the API the library provided (I added that in my fork of the library). So I can't find anything that would make sense for me to link to, the closest thing would be the field in the library code.

Okay thank you! Yeah "surfing around" the docs, it wasn't immediately clear to me. I have opened a PR to clarify this in the docs, thank you!