question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

is our block description syntax valid yaml?

See original GitHub issue

currently, 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:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
re-foxcommented, Sep 14, 2020

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.

  - api: foo
  description: bar

In my opinion it’s better to have commented descriptions than none at all. Those can always be uncommented and fixed up later.

1reaction
mr-tzcommented, Sep 14, 2020

Yeah, let’s fix this. Commenting out is a good start!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found