doctor

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package doctor says what workline needs on this machine and in a repository, what is missing, and the command that sets each one up, as `flutter doctor` and `brew doctor` do. It changes nothing.

Index

Constants

View Source
const (
	OK    = "ok"    // set up
	Note  = "note"  // a choice, said so it is not mistaken for a pass
	Warn  = "warn"  // something does not run; workline still works
	Error = "error" // workline cannot do what it is set up to do
)

The levels of a check, from fine to broken.

Variables

This section is empty.

Functions

func UsedTools

func UsedTools(rolesDir string) []string

UsedTools lists the tools the roles use, each once, sorted.

Types

type Check

type Check struct {
	Area    string `json:"area"` // machine | repository
	Rule    string `json:"rule"`
	Where   string `json:"where,omitempty"`
	Level   string `json:"level"`
	Message string `json:"message"`
	Fix     string `json:"fix,omitempty"` // the command that sets it up, or where to read how
}

Check is one thing looked at.

type Options

type Options struct {
	Repo     string // a repository's root; empty: the machine only
	RolesDir string
	AI       string // WORKLINE_AI, which the hooks use first
	UserAI   string // `ai:` in the user's config
	// NoPushApproval: the person has not asked to approve each push (ADR-0011).
	NoPushApproval bool
}

Options say where to look.

type Report

type Report struct {
	Status   string  `json:"status"` // pass, or block when a check is an error
	Summary  string  `json:"summary"`
	Checks   []Check `json:"checks"`
	Findings []Check `json:"findings"`
}

Report is what the doctor found. Findings are the checks that are not ok.

func Run

func Run(o Options) *Report

Run looks at the machine, then at the repository when there is one.

Jump to

Keyboard shortcuts

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