checkcmd

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailedStepName

func FailedStepName(results []StepResult) string

FailedStepName returns the first step that failed (not skipped).

func FormatFailureSummary

func FormatFailureSummary(results []StepResult, runErr error) string

FormatFailureSummary builds a readable failure summary for CLI output.

func InitConfigTemplate

func InitConfigTemplate(repoRoot string) (string, error)

InitConfigTemplate writes `.fastgit/check.yaml` when missing.

func New

func New() *redant.Command

New creates the check command group.

Types

type Config

type Config struct {
	Steps []Step
}

Config holds check pipeline configuration.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the built-in pipeline for Go projects.

func LoadConfig

func LoadConfig(repoRoot string) Config

LoadConfig loads `.fastgit/check.yaml` or returns defaults.

type RunOptions

type RunOptions struct {
	StagedOnly bool
	Fix        bool
	DryRun     bool
	RepoRoot   string
}

RunOptions controls check execution.

type Step

type Step struct {
	Name        string
	Command     string
	FixCommand  string
	Fixable     bool
	Optional    bool
	Description string
}

Step defines one quality gate step.

type StepResult

type StepResult struct {
	Step    Step
	Skipped bool
	Reason  string
	Err     error
	Output  string
}

StepResult holds the outcome of one step.

func Run

func Run(ctx context.Context, cfg Config, opts RunOptions) ([]StepResult, error)

Run executes the check pipeline.

Jump to

Keyboard shortcuts

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