Skip to content

Get the line/column/character of a YamlValue #145

Description

@z16

The YamlMapping has a public MappingStart and MappingEnd property, same with YamlSequence and SequenceStart/SequenceEnd respectively. A YamlValue, however, has no public equivalent. It has a Scalar property, which contains the relevant data, but it's internal. Is that intentional? Is there an intended way to get that info, or is that not meant to be public?

For reference, I'm writing an analyzer that should report error messages when validating the contents of specific scalar in a well-formed YAML file, and I'd like to report the line/column number during the MSBuild process, so you get clickable errors and warnings that get you straight to the correct point in the YAML file.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions