-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
5 / 55 of 5 issues completedClosed
5 / 55 of 5 issues completed
Copy link
Labels
Description
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
Runwith manual error handling andos.Exit(1) - Only 4 commands use
RunE
Target State
- All commands use
RunEand 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:
- Error messages remain user-friendly
- Exit codes are correct
- All existing tests pass
- No behavioral changes for users
Related to [plan] Migrate all commands from Run to RunE for idiomatic error handling #5282
AI generated by Plan Command for #5282
Reactions are currently unavailable