Commit 0bf0141
committed
util/yaml: warn on duplicate keys in mappings
When adding drivers/resources to an environment config or resources to
an exporter config, users can stumble upon redundant keys. The resulting
errors are not obvious, the last key simply overrides any previous
entries with the same key.
In order to make these config errors more obvious, emit a warning when
duplicate keys are detected in mappings.
Signed-off-by: Bastian Krause <bst@pengutronix.de>1 parent 8599a03 commit 0bf0141
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
19 | 32 | | |
| 33 | + | |
20 | 34 | | |
21 | 35 | | |
22 | 36 | | |
| |||
0 commit comments