Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request implements a comprehensive output formatting system with support for customizable colors and emoji flags. The changes introduce a structured Writer system that separates content from presentation, allowing users to control output styling through --colors, --emoji, and --no-emoji flags while maintaining terminal capability auto-detection.
- Refactors all hardcoded ANSI color codes and emoji into a centralized output system
- Adds global flags for controlling colors (auto/always/never) and emoji output
- Introduces structured error types with getter methods for enhanced error formatting
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/output.go | New centralized output formatting system with Writer and Message types |
| cmd/output_test.go | Comprehensive tests for the new output system |
| cmd/root.go | Adds global flags and structured error handling |
| internal/core/errors.go | New structured error types with metadata |
| internal/git/errors.go | Removes formatting, adds getter methods for structured errors |
| internal/fs/errors.go | Removes formatting, adds getter methods for structured errors |
| internal/core/lnk.go | Updates to use new structured error constructors |
| go.mod | Updates pflag dependency version |
| cmd/*.go | Updates all command files to use new Writer system |
Comments suppressed due to low confidence (1)
go.mod:14
- The version v1.0.7 of github.com/spf13/pflag does not exist. The latest version as of my knowledge cutoff is v1.0.5. Please verify this version exists or use a valid version.
github.com/spf13/pflag v1.0.7 // indirect
Add new output formatting system with flags for color and emoji control: - Introduce OutputConfig and Writer structs for flexible output handling - Add --colors and --emoji/--no-emoji global flags - Refactor commands to use new Writer for consistent formatting - Separate error content from presentation for better flexibility
Owner
Author
|
Implements #17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds support for configuring output formatting with new flags:
--colors, --emoji, and --no-emoji. It introduces a structured Writer system
that separates content from presentation, allowing for flexible output
styling based on user preferences and terminal capabilities.