executor

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasFailure

func HasFailure(results []Result) bool

func ParseSkipEnv

func ParseSkipEnv() []string

func PrintPolicyResult

func PrintPolicyResult(result *policy.EvalResult, quiet bool)

func PrintResults

func PrintResults(results []Result, verbose bool, quiet bool)

Types

type Executor

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

func New

func New(cfg *config.Config, toolMgr *tool.Manager, workDir string) *Executor

func (*Executor) CheckPolicies

func (e *Executor) CheckPolicies(files []string, commitMsg string) *policy.EvalResult

func (*Executor) Run

func (e *Executor) Run(hookType string, files []string, allFiles bool) []Result

func (*Executor) SetOptions

func (e *Executor) SetOptions(opts Options)

type Options

type Options struct {
	Verbose    bool
	Quiet      bool
	Fix        bool
	FailFast   bool
	DryRun     bool
	JSONOutput bool
	NoColor    bool
	SkipHooks  []string
	CommitMsg  string
}

type Result

type Result struct {
	Name     string
	Success  bool
	Skipped  bool
	Duration time.Duration
	Output   string
	Error    error
}

Jump to

Keyboard shortcuts

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