pipeline

package
v0.7.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 8 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

func (*DeadcodeCheck) Run

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

type GitleaksCheck

type GitleaksCheck struct{}

GitleaksCheck scans for secrets.

func (*GitleaksCheck) Name

func (c *GitleaksCheck) Name() string

func (*GitleaksCheck) Run

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

type GoVetCheck

type GoVetCheck struct {
	Paths []string
}

GoVetCheck runs go vet.

func (*GoVetCheck) Name

func (c *GoVetCheck) Name() string

func (*GoVetCheck) Run

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

type GoVulnCheck

type GoVulnCheck struct {
	Paths []string
}

GoVulnCheck runs vulnerability scanning.

func (*GoVulnCheck) Name

func (c *GoVulnCheck) Name() string

func (*GoVulnCheck) Run

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

type GolangCILintCheck

type GolangCILintCheck struct {
	Paths      []string
	ConfigType config.AssetType // The specific lens to use
}

GolangCILintCheck runs the linter with a specific configuration mode.

func (*GolangCILintCheck) Name

func (c *GolangCILintCheck) Name() string

func (*GolangCILintCheck) Run

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

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