validation

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package validation holds the generic bundle-linting mechanism behind `lore validate`. Core owns scanning and diagnostics; plugins contribute the policy through Validator functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDiagnostic

func FormatDiagnostic(d Diagnostic) string

Types

type Bundle

type Bundle struct {
	Root  string
	FS    vfs.FileSystem
	Files []File
}

type Diagnostic

type Diagnostic struct {
	Path     string
	Line     int
	Column   int
	Severity Severity
	Rule     string
	Message  string
}

func Scan

func Scan(fsys vfs.FileSystem, root string, validators ...Validator) ([]Diagnostic, error)

type File

type File struct {
	AbsolutePath string
	Path         string
	Content      []byte
}

type Severity

type Severity string
const (
	SeverityError   Severity = "error"
	SeverityWarning Severity = "warning"
)

type Validator

type Validator func(Bundle) []Diagnostic

Jump to

Keyboard shortcuts

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