commands

package
v0.0.0-...-ffc4fba Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0, Apache-2.0 Imports: 49 Imported by: 0

Documentation

Overview

Package commands implements CLI command handlers for codefang.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoAnalyzersSelected is returned when no analyzer IDs match the selection.
	ErrNoAnalyzersSelected = errors.New(
		"no analyzers selected. Use -a flag, e.g.: -a burndown,couples\n" +
			"Available: anomaly, burndown, couples, devs, file-history, imports, quality, sentiment, shotness, typos",
	)
	// ErrUnknownAnalyzer indicates a requested analyzer ID is not in the registry.
	ErrUnknownAnalyzer = errors.New("unknown analyzer")
	// ErrRepositoryLoad indicates a failure to open or load the git repository.
	ErrRepositoryLoad = errors.New("failed to load repository")
	// ErrPlotOutputRequired is returned when --format plot is used without --output.
	ErrPlotOutputRequired = errors.New("--output flag is required when --format plot")
)
View Source
var ErrEmptyStore = errors.New("no analyzer data found in store")

ErrEmptyStore is returned when the store contains no analyzer data.

View Source
var ErrNoOutputDir = errors.New("output directory is required (use --output)")

ErrNoOutputDir is returned when the --output flag is not set.

View Source
var ErrNoSectionRenderer = errors.New("no section renderer registered")

ErrNoSectionRenderer is returned when no store section renderer is registered.

Functions

func NewRenderCommand

func NewRenderCommand() *cobra.Command

NewRenderCommand creates the render subcommand.

func NewRunCommand

func NewRunCommand() *cobra.Command

NewRunCommand creates the unified run command.

Types

type HistoryRunOptions

type HistoryRunOptions struct {
	GCPercent   int
	BallastSize string

	CPUProfile  string
	HeapProfile string

	Limit       int
	FirstParent bool
	Head        bool
	Since       string

	Workers         int
	BufferSize      int
	CommitBatchSize int
	BlobCacheSize   string
	DiffCacheSize   int
	BlobArenaSize   string
	MemoryBudget    string

	Checkpoint      *bool
	CheckpointDir   string
	Resume          *bool
	ClearCheckpoint bool

	DebugTrace bool
	NDJSON     bool

	ConfigFile string

	PlotOutput string
	KeepStore  bool
	TmpDir     string

	AnalyzerFlags map[string]any
}

HistoryRunOptions holds all history pipeline runtime options.

type RunCommand

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

RunCommand holds configuration and dependencies for the unified run command.

Jump to

Keyboard shortcuts

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