Bug: New "Format yaml array sections" toggle puts single Date value into array
See original GitHub issueDescribe the Bug
With the new “Format YAML Array” and “Format yaml array sections” rules, a single non-array date value in the YAML is getting converted into an array. I do not understand why!
How to Reproduce
In “Settings” -> “Linter” turn on the first toggle under “Format YAML Array” and the “Format yaml array sections” toggle. Run the linter on the following:
---
date: 2022-08-14
tags: []
---
Result is:
---
date: [2022-08-14]
tags: []
---
This breaks all my dataview queries that use the date
field, since they expect it to be a Date and not an array.
Expected Behavior
No changes made by linter. Expected output:
---
date: 2022-08-14
tags: []
---
Device
- Desktop
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
How to escape indicator characters (colon and hyphen) in YAML
A pipe preserves newlines, a gt-sign turns all the following lines into one long string. Share.
Read more >defining dates in array elements giving error - ServiceNow
Solved: Hi Friends , Below i am trying to fetch some changes and update those actual start and end dates using arrays. But...
Read more >Variables in YAML pipeline are not allowing to define array
I need to be able to enter e.g. array of values like "servername","tenant","environmentname" to be able to deploy to multiple environments... Is this...
Read more >Python and TOML: New Best Friends - Real Python
Values have types. In this example, the value is a text string. You'll learn about the different value types in the following subsections....
Read more >Swagger RESTful API Documentation Specification
This object is used to describe the value types used inside an array. Of the Data Type Fields, it can include either the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a fix for this. It will hopefully go out in a release soon. I would like to be able to release it with another bug fix if possible to avoid making a release for just one bug fix however I may end up releasing it today anyways as it is a bug fix for a new rule.
I did manage to find another bug which was reported by someone else. I will merge it in and plan to release this evening. Hopefully this will make it so bugs are kept to a minimum and get addressed more quickly while allowing time to add FRs.