diagnostic

package
v0.0.0-...-4a73956 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeverityError       = 1
	SeverityWarning     = 2
	SeverityInformation = 3
	SeverityHint        = 4
)

Severity levels for diagnostics using bit flags

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Message  string
	Location position.RawPosition
	Severity int
}

Diagnostic represents a diagnostic message

func GetDiagnostics

func GetDiagnostics(ctx context.Context, template string, registry *ast.Registry) ([]*Diagnostic, error)

GetDiagnostics returns diagnostic information for a template

func GetDiagnosticsFromParsed

func GetDiagnosticsFromParsed(ctx context.Context, nodes *parser.ParsedTemplateFile, registry *ast.Registry) ([]*Diagnostic, error)

GetDiagnosticsFromParsed returns diagnostic information for a parsed template

Jump to

Keyboard shortcuts

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