check

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package check validates a workspace: structural integrity (cycles, brick kinds), the interface boundary, worker-type effect-propagation rules, and project declared-vs-imported consistency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Severity Severity
	Group    Group
	Message  string
}

Diagnostic is a single check finding.

type Group

type Group string

Group names the rule category a diagnostic belongs to, so worker-type findings can be surfaced distinctly from structural ones.

const (
	GroupStructure  Group = "structure"
	GroupBoundary   Group = "boundary"
	GroupWorkerType Group = "worker-type"
	GroupProject    Group = "project"
)

type Report

type Report struct {
	Diagnostics []Diagnostic
}

Report collects diagnostics from a check run.

func Run

func Run(ws *model.Workspace) (*Report, error)

Run validates the workspace and returns a report.

func (*Report) HasErrors

func (r *Report) HasErrors() bool

HasErrors reports whether any diagnostic is an error.

type Severity

type Severity int

Severity classifies a diagnostic.

const (
	Error Severity = iota
	Warning
)

func (Severity) String

func (s Severity) String() string

Jump to

Keyboard shortcuts

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