is our block description syntax valid yaml?
See original GitHub issuecurrently, we allow rule authors to add a description to and/or/etc. like so:
and:
- match: foo
- match: bar
description: this is awesome!
(concrete example here)
this seemed like a natural way to extend our two-line syntax for feature descriptions, which look like:
and:
- string: foo
description: bar
however, i’m not sure that the former is valid yaml. ruamel accepts it, but pyyaml does not. take a moment to look at it and try to figure out how it should be parsed? is the child of the and
a list or dictionary???
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
YAML: an Overview
The basic syntax of YAML is to use key-value pairs in the format key: value . A YAML code block should be fenced...
Read more >YAML Ain't Markup Language (YAML™) revision 1.2.2
YAML's block collections use indentation for scope and begin each entry on its own line. Block sequences indicate each entry with a dash...
Read more >YAML Syntax - Ansible Documentation
This page provides a basic overview of correct YAML syntax, which is how Ansible playbooks (our configuration management language) are expressed.
Read more >YAML - Quick Guide - Tutorialspoint
YAML includes block collections which use indentation for scope. Here, each entry begins with a new line. Block sequences in collections indicate each...
Read more >YAML Tutorial: Everything You Need to Get Started in Minutes
This YAML tutorial will demonstrate the language syntax with a guide and some ... Let's take a look at a YAML file for...
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 agree! That sounds like a good plan.
I remember at the time, modifying the rule several times before I found a working variation. I think that’s how I ended up on.
In my opinion it’s better to have commented descriptions than none at all. Those can always be uncommented and fixed up later.
Yeah, let’s fix this. Commenting out is a good start!