runner

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package runner provides the check execution engine for the pre-commit system

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Name       string
	Success    bool
	Error      string
	Output     string
	Duration   time.Duration
	Files      []string
	Suggestion string
	CanSkip    bool
	Command    string
}

CheckResult contains the result of a single check

type Options

type Options struct {
	Files               []string
	OnlyChecks          []string
	SkipChecks          []string
	Parallel            int
	FailFast            bool
	ProgressCallback    ProgressCallback
	GracefulDegradation bool
}

Options configures a check run

type ProgressCallback

type ProgressCallback func(checkName, status string)

ProgressCallback is called during check execution for progress updates

type Results

type Results struct {
	CheckResults  []CheckResult
	Passed        int
	Failed        int
	Skipped       int
	TotalDuration time.Duration
	TotalFiles    int
}

Results contains the results of a check run

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes pre-commit checks

func New

func New(cfg *config.Config, repoRoot string) *Runner

New creates a new Runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, opts Options) (*Results, error)

Run executes checks based on the provided options

Jump to

Keyboard shortcuts

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