Currently unknown keys when inputting mapping traits have the location set to the Value.
Example:
YAML:1:14: error: unknown key 'UnknownKey' {UnknownKey: SomeValue} ^~~~~~~~~
This is unhelpful for a user as it draws them to fix the wrong item.
Differential D93037
[YAML] Use correct source location for unknown key errors. njames93 on Dec 10 2020, 8:21 AM. Authored by
Details Currently unknown keys when inputting mapping traits have the location set to the Value. YAML:1:14: error: unknown key 'UnknownKey' {UnknownKey: SomeValue} ^~~~~~~~~ This is unhelpful for a user as it draws them to fix the wrong item.
Diff Detail
Event TimelineComment Actions Would be nice to find a way to test this (Maybe a FileCheck test? not sure how to set that up though; don't worry if it is too much work.) Comment Actions Bit of a pain to set that up explicitly. Thankfully, there are 8 test failures(per platform) introduced by this patch that demonstrate the old unexpected behaviour. |