validator

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistsError

func ExistsError(outs []*ValidationOutput) bool

func Format

func Format(outs []*ValidationOutput) string

Types

type ValidationOutput

type ValidationOutput struct {
	IsWarning  bool
	Path       string
	Start      ast.SourcePos
	End        ast.SourcePos
	Message    string
	SourceLine string
}

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func New

func New() *Validator

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context, file *source.File, opts ...ValidatorOption) []*ValidationOutput

type ValidatorOption

type ValidatorOption func(v *Validator)

func ImportPathOption

func ImportPathOption(path ...string) ValidatorOption

func ManualImportOption added in v0.3.3

func ManualImportOption() ValidatorOption

Jump to

Keyboard shortcuts

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