Describe the bug
When unmarshalling yaml files with certain kinds of whitespace errors, an error is not returned and all content after the whitespace error is truncated.
The expected behavior is that at err := yaml.Unmarshal(originalData, &content);, we return a non-nil error since we could not parse the entire file.
Screenshots
Let's say we have a yaml file with these contents:
formatVersion: 1
name: some name
description: |
some description
continuing the description without proper whitespace
system: some system
source: snowflake
Describe the bug When unmarshalling yaml files with certain kinds of whitespace errors, an error is not returned and all content after the whitespace error is truncated.
To Reproduce
https://go.dev/play/p/WgvHk09B-Px
Expected behavior
The expected behavior is that at
err := yaml.Unmarshal(originalData, &content);
, we return a non-nil error since we could not parse the entire file.Screenshots
Let's say we have a yaml file with these contents:
This is most definitely invalid yaml -
Version Variables
v1.22.3
v1.11.2