Skip to content

refactor: remove unused resize image functions - #690

Merged
mwbrooks merged 2 commits into
mainfrom
mwbrooks-remove-dead-resize-image
Oct 9, 2026
Merged

mwbrooks merged 2 commits into
mainfrom
mwbrooks-remove-dead-resize-image

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Oct 9, 2026

Copy link
Copy Markdown
Member

Changelog

N/A - internal cleanup with no user-facing changes.

Summary

This pull request removes unused image resize functions found with the Go deadcode tool.

  • Removes ResizeImage, ResizeImageToBytes, and ResizeImageFromFileToBytes from internal/image/image.go
  • Removes their unit tests from internal/image/image_test.go
  • The CropResizeImageRatio* functions are unchanged and still used for app icons

Preview

N/A

Testing

  1. Run go run golang.org/x/tools/cmd/deadcode@latest ./... | grep internal/image and confirm the ResizeImage* functions are no longer listed
  2. Run grep -rn "ResizeImage" --include='*.go' . and confirm only CropResizeImageRatio* references remain

Notes

CropResizeImageRatioFromFile is also reported as unreachable by deadcode but is left in place to keep this change focused.

Requirements

@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Oct 9, 2026
@mwbrooks mwbrooks self-assigned this Oct 9, 2026
@mwbrooks mwbrooks added this to the Next Release milestone Oct 9, 2026
@mwbrooks
mwbrooks marked this pull request as ready for review October 9, 2026 19:25
@mwbrooks
mwbrooks requested a review from a team as a code owner October 9, 2026 19:25
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.21%. Comparing base (2e44890) to head (55152ab).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #690      +/-   ##
==========================================
- Coverage   78.22%   78.21%   -0.01%     
==========================================
  Files         239      239              
  Lines       18144    18127      -17     
==========================================
- Hits        14193    14178      -15     
+ Misses       3951     3949       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwbrooks Thanks for keeping our maintained code current. Whenever right please merge this because unit tests ought suffice even when removed? 🧪 📸 ✨

@mwbrooks
mwbrooks enabled auto-merge (squash) October 9, 2026 23:15
@mwbrooks

mwbrooks commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

@zimeg Roger 🫡 Thanks for the eyes 🚀

@mwbrooks
mwbrooks merged commit a9bda96 into main Oct 9, 2026
13 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-remove-dead-resize-image branch October 9, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants