Skip to content

Commit

Permalink
swiftlint + changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
tejassharma96 committed May 6, 2024
1 parent ef128c0 commit e1dd181
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## Main

##### Breaking

* None.

##### Enhancements

* None.

##### Bug Fixes

* Yams will now correctly error when it tries to decode a mapping with duplicate keys.
[Tejas Sharma](https://github.com/tejassharma96)
[#415](https://github.com/jpsim/Yams/issues/415)

## 5.1.2

##### Breaking
Expand Down
3 changes: 2 additions & 1 deletion Sources/Yams/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ private extension Parser {
throw YamlError.parser(
context: YamlError.Context(text: "expected all keys in mapping to be unique",
mark: Mark(line: 1, column: 1)),
problem: "but found multiple instances of: \(duplicateKeys.compactMap { $0.string })", duplicatedKey.mark!,
problem: "but found multiple instances of: \(duplicateKeys.compactMap { $0.string })",
duplicatedKey.mark!,
yaml: yaml)
}
let node = Node.mapping(.init(pairs, tag(firstEvent.mappingTag), event.mappingStyle, firstEvent.startMark))
Expand Down

0 comments on commit e1dd181

Please sign in to comment.