-
Notifications
You must be signed in to change notification settings - Fork 3.5k
chore: remove unused github.com/fatih/color #1875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes the unused github.com/fatih/color dependency and improves CI validation by enforcing clean module files.
Changes:
- Removed unused
github.com/fatih/colordependency and its transitive dependencies (mattn/go-colorable, mattn/go-isatty) - Updated CI workflow to validate module file cleanliness with
go mod tidy -diffinstead of just downloading dependencies
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| go.mod | Removed github.com/fatih/color from require block and reflowed indirect dependencies alphabetically |
| go.sum | Removed checksums for fatih/color, mattn/go-colorable, mattn/go-isatty, and related golang.org/x/sys entries |
| .github/workflows/go.yml | Changed CI step from go mod download to go mod tidy -diff to enforce module file discipline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
go.mod:14
- According to the project's coding guidelines, when dependencies are changed, you should run
script/licensesto update the third-party license files. Please verify thatscript/licenseshas been run and commit any changes to the third-party-licenses.*.md files if they were updated. This ensures license compliance is maintained.
go 1.24.0
require (
github.com/google/go-github/v79 v79.0.0
github.com/google/jsonschema-go v0.4.2
github.com/josephburnett/jd v1.9.2
github.com/microcosm-cc/bluemonday v1.0.27
github.com/muesli/cache2go v0.0.0-20221011235721-518229cd8021
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
)
SamMorrowDrums
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great catch! Appreciate the diligent PRs.
|
Closing in favor of #1892 which rebases your commits onto main. Your authorship has been preserved - thank you for the contribution! 🎉 |
Summary
Removes the unused
github.com/fatih/colordependency.Why
The
fatih/colorpackage was unused in the codebase. This can be detected viago mod tidy. To prevent future regressions, this step was added in place ofgo mod download. Additionally, a workaround is needed on Windows to handle CRLF line endings that causego mod tidy -diffto fail during CI runs.What changed
github.com/fatih/colorfromgo.modandgo.sumfatih/colorgo mod downloadtogo mod tidy -difffor better dependency validationMCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testDocs