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.

Support for custom YAML tags

See original GitHub issue

Some utilities extend YAML syntax with custom tags. For example JJB introduces “include” tags, http://jenkins-job-builder.readthedocs.io/en/latest/definition.html?highlight=!include-raw#module-jenkins_jobs.local_yaml

YAML linter fails on provided examples. Eg here

- job:
  name: test-job-1
  builders:
    !include: include001.yaml.inc

it says unknown tag <!include:> at: '4,5'.

According to documentation, currently there is no way

  • to ignore some warnings, or
  • to extend YAML schema with additional tags.

But custom tags are language feature, see http://www.yaml.org/spec/1.2/spec.html#id2761292 , Example 2.24. Global Tags. This document causes errors too:

%TAG ! tag:clarkevans.com,2002:
--- !shape
  # Use the ! handle for presenting
  # tag:clarkevans.com,2002:circle
- !circle
  center: &ORIGIN {x: 73, y: 129}
  radius: 7
- !line
  start: *ORIGIN
  finish: { x: 89, y: 102 }
- !label
  start: *ORIGIN
  color: 0xFFEEBB
  text: Pretty vector drawing.

Could you implement this spec or add some workaround?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

8reactions
riemerscommented, Apr 4, 2018

Having the same issue db_url: !secret db_url when using secrets variables in home assistant.

8reactions
sanyercommented, Mar 28, 2018

Facing the same problem for CloudFormation templates which have tags like !Ref, !GetAtt etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Powerful Python Trick: Custom YAML tags & PyYAML
A simple yet powerful way to improve the way you write and use configuration files in Python.
Read more >
Custom Tagger Using YAML Configuration Files - yor
The Yor framework uses YAML configuration files to support advanced rules when applying custom tags. Users can define tagging enforcement rules that are ......
Read more >
Custom YAML data types - GitHub Pages
Each YAML node has a tag specifying its type. For instance: strings use the tag tag:yaml.org,2002:str . Tags of most default types are...
Read more >
New in Symfony 3.3: Custom YAML tags
The Symfony Yaml component already supports several tags, such as !!binary for storing binary data, and !php/const: for referring to PHP constants.
Read more >
Add Custom AWS YAML Tags in VS Code - Duncan Leung
The fix was the add the yaml.customTags property in my Visual Studio Code settings.json , with an array of custom tags I wanted...
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