-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Labels
Description
Objective
Replace raw fmt.Fprintf(os.Stderr, ...) calls with console.Format* wrappers across the remaining CLI files identified in the Terminal Stylist audit (discussion #21126).
Context
The audit found ~54 files with unformatted stderr output. This issue covers the remaining files not addressed in the other sub-issues (copilot_setup, mcp_list_tools, gateway_logs, MCP files, and add/interactive files).
Files to Modify
All files are in pkg/cli/:
actionlint.goaudit.goaudit_report_render.gocompile_helpers.gocompile_stats.gocompile_watch.gocopilot_agents.godeps_outdated.godeps_report.godeps_security.godevcontainer.godomains_command.goenable.goengine_secrets.gofix_command.gohealth_command.goinit.golist_workflows_command.gologs_orchestrator.gologs_report.gopr_command.gopreconditions.goremove_command.gosecret_set_command.goshell_completion.gotokens_bootstrap.gotrial_command.gotrial_repository.goupdate_actions.goupdate_check.goupdate_display.goupgrade_command.govscode_config.go
Approach
For each file:
- Find all
fmt.Fprintf(os.Stderr, ...)andfmt.Fprintln(os.Stderr, ...)calls NOT already using console formatters - Choose the correct formatter based on message semantics:
- Info/neutral →
console.FormatInfoMessage - Success/completion →
console.FormatSuccessMessage - Warning →
console.FormatWarningMessage - Error →
console.FormatErrorMessage - Command display →
console.FormatCommandMessage - Progress →
console.FormatProgressMessage - List items →
console.FormatListItem - Section headers →
console.FormatSectionHeader
- Info/neutral →
- Convert
fmt.Fprintf(os.Stderr, "...\n", args...)→fmt.Fprintln(os.Stderr, console.FormatXxxMessage(fmt.Sprintf("...", args...)))
Note
Do NOT change:
- Calls that already wrap a
console.Format*function - Calls that output structured data (JSON, tables, hashes, graphs) to stdout
fmt.Println(jsonBytes),fmt.Println(hash),fmt.Println(mermaidGraph)— these are correct stdout usage
Acceptance Criteria
- All raw
fmt.Fprintf(os.Stderr, ...)diagnostic messages in the listed files replaced with console formatters -
make fmtpasses with no changes -
make test-unitpasses
Generated by Plan Command for issue #discussion #21126 · ◷
- expires on Mar 18, 2026, 5:12 AM UTC
Reactions are currently unavailable