diags

package
v0.71.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectDiagnostics

func InjectDiagnostics(content string, diags []Diagnostic, color output.Color) string

Types

type Diagnostic

type Diagnostic struct {
	Message     string
	Pos         PositionRanges
	FirstColumn int // 1-indexed
	LastColumn  int // 1-indexed
}

type LineRange

type LineRange struct {
	First int
	Last  int
}

func (LineRange) Expand

func (lr LineRange) Expand() []int

func (LineRange) String

func (lr LineRange) String() string

type PositionRange

type PositionRange struct {
	Line        int // 1-indexed
	FirstColumn int // 1-indexed
	LastColumn  int // 1-indexed
}

type PositionRanges

type PositionRanges []PositionRange

func NewPositionRange

func NewPositionRange(lines []string, val *yaml.Node, minColumn int) PositionRanges

func (PositionRanges) AddOffset

func (prs PositionRanges) AddOffset(line, column int) PositionRanges

func (PositionRanges) Len

func (prs PositionRanges) Len() (l int)

func (PositionRanges) Lines

func (prs PositionRanges) Lines() (lr LineRange)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL