executor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisResult

type AnalysisResult struct {
	ProjectRoot      string
	Languages        map[string][]string
	AvailableTools   []string
	RecommendedTools map[string][]string
	ConfigFiles      map[string]string
	Issues           []string
}

AnalysisResult contains the results of project analysis.

type ExecutionPlanner

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

ExecutionPlanner creates execution plans.

func NewExecutionPlanner

func NewExecutionPlanner(analyzer ProjectAnalyzer) *ExecutionPlanner

NewExecutionPlanner creates a new execution planner.

func (*ExecutionPlanner) CreatePlan

func (p *ExecutionPlanner) CreatePlan(projectRoot string, registry tools.ToolRegistry, options PlanOptions) (*tools.ExecutionPlan, error)

CreatePlan creates an execution plan for the given options.

type GitUtils

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

GitUtils provides Git-related utilities (embedded for simplicity).

func (*GitUtils) GetAllChangedFiles

func (g *GitUtils) GetAllChangedFiles() ([]string, error)

func (*GitUtils) GetChangedFiles

func (g *GitUtils) GetChangedFiles(since string) ([]string, error)

func (*GitUtils) GetStagedFiles

func (g *GitUtils) GetStagedFiles() ([]string, error)

func (*GitUtils) IsGitRepository

func (g *GitUtils) IsGitRepository() bool

func (*GitUtils) ValidateCommitish

func (g *GitUtils) ValidateCommitish(commitish string) error

type ParallelExecutor

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

ParallelExecutor executes quality tools in parallel.

func NewParallelExecutor

func NewParallelExecutor(maxWorkers int, timeout time.Duration) *ParallelExecutor

NewParallelExecutor creates a new parallel executor.

func (*ParallelExecutor) Execute

func (e *ParallelExecutor) Execute(ctx context.Context, plan *tools.ExecutionPlan) ([]*tools.Result, error)

Execute runs the execution plan sequentially.

func (*ParallelExecutor) ExecuteParallel

func (e *ParallelExecutor) ExecuteParallel(ctx context.Context, plan *tools.ExecutionPlan, workers int) ([]*tools.Result, error)

ExecuteParallel runs the execution plan with parallel execution.

type PlanOptions

type PlanOptions struct {
	Files      []string          // Specific files to process
	Fix        bool              // Auto-fix issues if supported
	FormatOnly bool              // Run only formatters
	LintOnly   bool              // Run only linters
	ExtraArgs  []string          // Extra arguments to pass to tools
	Env        map[string]string // Environment variables
	Language   string            // Filter by specific language
	ToolFilter []string          // Filter by specific tool names
	// Git-based options
	Since   string // Process files changed since this commit
	Staged  bool   // Process only staged files
	Changed bool   // Process only changed files (staged + modified + untracked)
}

PlanOptions contains options for creating execution plans.

type ProjectAnalyzer

type ProjectAnalyzer interface {
	AnalyzeProject(projectRoot string, registry tools.ToolRegistry) (*AnalysisResult, error)
	GetOptimalToolSelection(result *AnalysisResult, registry tools.ToolRegistry) map[string][]tools.QualityTool
}

ProjectAnalyzer is an alias to avoid circular import.

Jump to

Keyboard shortcuts

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