[dead-code] chore: remove dead functions — 1 function removed#46860
Conversation
Remove unreachable Stdout function from pkg/colorwriter package. The function had no callers in production code; only the spec_test.go called it which has been removed as well. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (0 additions detected in default business logic directories: src/, lib/, pkg/, internal/, app/, core/, domain/, services/, api/). |
|
✅ Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel skipped. (PR #46860 removed dead functions: 0 test additions, only deletions from existing tests.) |
|
✅ PR Code Quality Reviewer completed the code quality review. |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
There was a problem hiding this comment.
Pull request overview
Removes the colorwriter.Stdout convenience API across platforms and its specification test.
Changes:
- Removes native and wasm
Stdoutimplementations. - Removes the associated public API test.
Show a summary per file
| File | Description |
|---|---|
pkg/colorwriter/colorprofile_writer.go |
Removes native Stdout. |
pkg/colorwriter/colorprofile_writer_wasm.go |
Removes wasm Stdout stub. |
pkg/colorwriter/spec_test.go |
Removes the Stdout API test. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Medium
| @@ -22,12 +22,6 @@ func Stderr() io.Writer { | |||
| return New(os.Stderr, os.Environ()) | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
Dead-code removal is clean. Both build targets and the corresponding test are consistently removed, no remaining callers exist, and CI verifications are confirmed in the PR description. No issues found.
🔎 Code quality review by PR Code Quality Reviewer · 10.4 AIC · ⌖ 4.3 AIC · ⊞ 5.6K
Comment /review to run again
There was a problem hiding this comment.
Clean dead-code removal of the unused Stdout() function from both the native and wasm colorwriter implementations. No callers remain in the codebase, the corresponding test is also removed, and the build/vet checks pass. LGTM.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 11.9 AIC · ⌖ 6.99 AIC · ⊞ 5K
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design — no blocking issues, one follow-up needed.
📋 Summary
The removal of Stdout is clean: no non-test callers exist and both build variants are updated in sync. The only gap is that pkg/colorwriter/README.md still lists Stdout in the Public API and Build variants tables; it should be updated to match the new surface area.
Positive Highlights
- ✅ Both build variants (
colorprofile_writer.goandcolorprofile_writer_wasm.go) updated consistently - ✅ Corresponding spec test removed alongside the implementation — no dangling test
- ✅ PR description includes build/vet verification evidence
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 16 AIC · ⌖ 4.37 AIC · ⊞ 6.7K
Comment /matt to run again
|
🎉 This pull request is included in a new release. Release: |
test