I've been using it for years with minimal configuration. Considering how difficult YAML is, I think your tool is amazing!
Normally when a value is a "true"/"native" string like:
yamlfix remove the unnecessary quotes(BTW it seems that Github linter interpret '1a' as a int ? or at least not a string when looking at the color x)):
but there is some canvas, example when the string start with a "{}" or "[]" (first the user should quote the string, normal cuz there is not indication that is string a not a struct/list):
For these case, yamlfix do also the good thing and doesn't override it by removing quote
but here a more tricky one:
is always rewrite to
what is not a valid yaml, at least for kubernetes:
yaml.parser.ParserError: while parsing a flow node
expected the node content, but found ':'
in "<unicode string>", line 12, column 23:
nameservers: [::1]
helm-controller could not resolve ConfigMap chart values reference 'stalwart/stalwart' with key 'values.yaml': error converting YAML to JSON: yaml: line 11: did not find expected node content
But my IDE (yaml-language-server and yamlfix too) doesn't report me any error
Question
This a "bug" from yamlfix/my IDE or it is really a invalid YAML without the quote? And there any config (except add a exception for the concerned file) on yamlfix that I can tweak to prevent this?
I've been using it for years with minimal configuration. Considering how difficult YAML is, I think your tool is amazing!
Normally when a value is a "true"/"native" string like:
yamlfix remove the unnecessary quotes(BTW it seems that Github linter interpret '1a' as a int ? or at least not a string when looking at the color x)):
but there is some canvas, example when the string start with a "{}" or "[]" (first the user should quote the string, normal cuz there is not indication that is string a not a struct/list):
For these case, yamlfix do also the good thing and doesn't override it by removing quote
but here a more tricky one:
is always rewrite to
- ::1what is not a valid yaml, at least for kubernetes:
helm-controller could not resolve ConfigMap chart values reference 'stalwart/stalwart' with key 'values.yaml': error converting YAML to JSON: yaml: line 11: did not find expected node contentBut my IDE (yaml-language-server and yamlfix too) doesn't report me any error
Question
This a "bug" from yamlfix/my IDE or it is really a invalid YAML without the quote? And there any config (except add a exception for the concerned file) on yamlfix that I can tweak to prevent this?