Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detects dupe keys on arrays of hashes #7

Closed
shortdudey123 opened this issue May 5, 2015 · 0 comments · Fixed by #8
Closed

Detects dupe keys on arrays of hashes #7

shortdudey123 opened this issue May 5, 2015 · 0 comments · Fixed by #8
Assignees
Labels

Comments

@shortdudey123
Copy link
Owner

The following is a valid YAML file but yamllint detects dupe keys on foo

---
- foo: 1
  bar: 2
- foo: 1
  bar: 2

Loads into Ruby like so:

[{"foo"=>1, "bar"=>2}, {"foo"=>1, "bar"=>2}]

YamlLint output:

$ bundle exec ruby bin/yamllint spec/data/valid2.yaml 
Checking 1 files
spec/data/valid2.yaml
  The same key is defined more than once: 
  The same key is defined more than once: .foo
  The same key is defined more than once: .bar
YAML lint found 1 errors
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant