yamllint icon indicating copy to clipboard operation
yamllint copied to clipboard

Retrieve aliases not for keys

Open flavono123 opened this issue 6 years ago • 1 comments

Correct the detecting wrong key in such following YAML and test:

$ cat alias_dup_values.yaml
---
foo: &foo
bar:
  <<: *foo
  key1: val
  key2: val
  key3: val
$ yamllint alias_dup_values.yaml
Checking 1 files
alias_dup_values.yaml
  The same key is defined more than once: bar.val
YAML lint found 1 errors

And refactor to reduce codes

flavono123 avatar Aug 17 '18 15:08 flavono123

Thanks for the fix! After #39 is merged, I will have you rebase on master to verify the tests pass. Also, can you add a line to the CHANGELOG in the unreleased section following the existing format?

shortdudey123 avatar Sep 23 '21 22:09 shortdudey123