Doesn't recognize yaml syntax for regular expressions as valid.
See original GitHub issueDescribe the bug
Valid YAML syntax for regular expressions reported as invalid (unknown tag)
Expected Behavior
Entries should not display an error.
Current Behavior
Entries are flagged as unknown tag
Steps to Reproduce
- Create a file and ensure language is set to YAML.
- Use the following yaml:
---
case-insensitive: !ruby/regexp "/George McFly/i"
complex: !ruby/regexp "/\\A\"((?:[^\"]|\\\")+)\"/"
simple: !ruby/regexp '/a.b/'
- Observe error listed under text
!ruby/regexp
-> Invalid Tag: <!ruby/regexp>
Environment
- Windows
- Mac
- Linux
- other (please specify)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
CI Lint doesn't recognize a valid RegExp as such - GitLab
Summary. CI fails identifying some RegExps as a valid ones, failing the CI linter check. Steps to reproduce. Below yaml ci-script results in ......
Read more >Avoid YAML formatting problems | Filebeat Reference [8.5]
If you need to specify a regular expression in a YAML file, it's a good idea to wrap the regular expression in single...
Read more >Regex to match key in YAML - python - Stack Overflow
yaml using 'safe'-mode). What you need to do, is regular expression match the keys of the value associated with server , not the...
Read more >Everything you need to know about Regular Expressions
You'll get a true or false result indicating whether the string belongs to the set of zip codes the regex pattern represents. Let's...
Read more >Use of a regex stored inside a YAML file
ruby/regexp before your regex and wrapping it in single quotes in your settings.yml file. That still doesn't fix the issue with the RegExp...
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
It looks like the default built in schemas are broken, I’ve just filed an issue: https://github.com/redhat-developer/yaml-language-server/issues/356. Those ones are supposed to work out of the box
In quick testing, I get the same behaviour with explicit tags, that are defined within the spec, examples given in 2.23.
This is certainly not extensive testing, but it appears that no tags are supported natively, and that all must be defined in
yaml.customTags
.