Documentation
¶
Overview ¶
Package executor provides parallel execution of quality tools using worker pools.
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 (*GitUtils) GetChangedFiles ¶
func (*GitUtils) GetStagedFiles ¶
func (*GitUtils) IsGitRepository ¶
func (*GitUtils) ValidateCommitish ¶
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.