pipeline

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pipeline provides an engine for running analytical workflows (quality 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(ctx context.Context, exec *exec.ExecutorClient) Result
}

Check defines a single unit of analysis.

type DeadcodeCheck

type DeadcodeCheck struct{}

DeadcodeCheck finds unreachable code.

func (*DeadcodeCheck) Name

func (c *DeadcodeCheck) Name() string

Name returns the name of the check.

func (*DeadcodeCheck) Run

func (c *DeadcodeCheck) Run(ctx context.Context, execClient *exec.ExecutorClient) Result

Run executes the check.

type GitleaksCheck

type GitleaksCheck struct{}

GitleaksCheck scans for secrets.

func (*GitleaksCheck) Name

func (c *GitleaksCheck) Name() string

Name returns the name of the check.

func (*GitleaksCheck) Run

func (c *GitleaksCheck) Run(ctx context.Context, execClient *exec.ExecutorClient) Result

Run executes the check.

type GoModTidyCheck

type GoModTidyCheck struct{}

GoModTidyCheck verifies dependencies are tidy.

func (*GoModTidyCheck) Name

func (c *GoModTidyCheck) Name() string

Name returns the name of the check.

func (*GoModTidyCheck) Run

func (c *GoModTidyCheck) Run(ctx context.Context, execClient *exec.ExecutorClient) Result

Run executes the check.

type GoVetCheck

type GoVetCheck struct{}

GoVetCheck runs go vet.

func (*GoVetCheck) Name

func (c *GoVetCheck) Name() string

Name returns the name of the check.

func (*GoVetCheck) Run

func (c *GoVetCheck) Run(ctx context.Context, execClient *exec.ExecutorClient) Result

Run executes the check.

type GoVulnCheck

type GoVulnCheck struct{}

GoVulnCheck runs vulnerability scanning.

func (*GoVulnCheck) Name

func (c *GoVulnCheck) Name() string

Name returns the name of the check.

func (*GoVulnCheck) Run

func (c *GoVulnCheck) Run(ctx context.Context, execClient *exec.ExecutorClient) Result

Run executes the check.

type GolangCILintCheck

type GolangCILintCheck struct{}

GolangCILintCheck runs the linter.

func (*GolangCILintCheck) Name

func (c *GolangCILintCheck) Name() string

Name returns the name of the check.

func (*GolangCILintCheck) Run

func (c *GolangCILintCheck) Run(ctx context.Context, execClient *exec.ExecutorClient) Result

Run executes the check.

type Result

type Result struct {
	Name    string
	Status  Status
	Message string
	Advice  string
	Details string // Added to hold raw output (like deadcode list)
	Error   error
}

Result captures the output of a single check.

type Runner

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

Runner executes a list of checks and aggregates the results.

func NewRunner

func NewRunner(p *ui.Presenter, e *exec.ExecutorClient) *Runner

NewRunner creates a new pipeline runner.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, checks []Check) ([]Result, error)

Run executes all provided checks sequentially. It returns the list of results and an error if any check failed.

type Status

type Status int

Status represents the outcome of a check.

const (
	// StatusPass indicates the check succeeded.
	StatusPass Status = iota
	// StatusFail indicates the check failed (critical).
	StatusFail
	// StatusWarn indicates a non-critical issue or skipped check.
	StatusWarn
)

Jump to

Keyboard shortcuts

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