doctor

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package doctor runs safe project and environment checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check interface {
	Name() string
	Run(env Environment) Result
}

Check inspects a project without executing project code.

func DefaultChecks

func DefaultChecks() []Check

DefaultChecks returns the built-in project checks.

type Environment

type Environment struct {
	FS       fsx.FS
	Root     string
	Manifest *manifest.Manifest
	Lock     *lockfile.Lock
	Paths    paths.Resolved
}

Environment is the read-only context inspected by checks.

type IncludePathsExistCheck

type IncludePathsExistCheck struct{}

IncludePathsExistCheck checks each configured include directory.

func (IncludePathsExistCheck) Name

func (IncludePathsExistCheck) Run

type ManifestDriftCheck

type ManifestDriftCheck struct{}

ManifestDriftCheck compares the lockfile with the current manifest.

func (ManifestDriftCheck) Name

func (ManifestDriftCheck) Name() string

func (ManifestDriftCheck) Run

type ManifestParsesCheck

type ManifestParsesCheck struct{}

ManifestParsesCheck reports whether a manifest was parsed.

func (ManifestParsesCheck) Name

func (ManifestParsesCheck) Name() string

func (ManifestParsesCheck) Run

type Result

type Result struct {
	Name    string
	Status  Status
	Message string
}

Result is one check's outcome.

func Run

func Run(env Environment, checks []Check) []Result

Run executes every check in checks against env, in order, and returns one Result per check.

type Status

type Status int

Status is the outcome of one check.

const (
	StatusOK Status = iota
	StatusWarning
	StatusFail
)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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