Overview
This tracking issue covers the migration of all CLI command implementations from using Run to RunE for idiomatic Go error handling. This will eliminate 107 instances of repetitive error handling code and adopt best practices.
Source: Issue #5282
Current State
- 107 commands use
Run with manual error handling and os.Exit(1)
- Only 4 commands use
RunE
Target State
- All commands use
RunE and return errors directly
- Cobra handles exit codes automatically
- Consistent error formatting across all commands
Planned Sub-Issues
This work is broken into 5 manageable batches:
- Setup error formatter and migrate root/compile commands - Foundation work
- Migrate workflow commands - Core workflow operations (run, status, logs, audit)
- Migrate MCP commands - MCP server management commands
- Migrate development utilities - Development and testing commands
- Migrate remaining commands - All other commands for complete coverage
Benefits
- More idiomatic Go error handling
- Eliminates 107 instances of repetitive code
- Cleaner, more maintainable codebase
- Consistent error propagation pattern
Testing Strategy
Each batch will be tested to ensure:
AI generated by Plan Command for #5282
Overview
This tracking issue covers the migration of all CLI command implementations from using
RuntoRunEfor idiomatic Go error handling. This will eliminate 107 instances of repetitive error handling code and adopt best practices.Source: Issue #5282
Current State
Runwith manual error handling andos.Exit(1)RunETarget State
RunEand return errors directlyPlanned Sub-Issues
This work is broken into 5 manageable batches:
Benefits
Testing Strategy
Each batch will be tested to ensure:
Related to [plan] Migrate all commands from Run to RunE for idiomatic error handling #5282