[dead-code] chore: remove dead functions — 1 function removed#47093
Conversation
Remove unreachable NewIndeterminateProgressBar from pkg/console/progress.go along with its exclusive test helper nonTTYIndeterminateProgressBar and the two indeterminate subtests in TestGolden_ProgressBarNonTTY. The function has no callers in any non-test binary. The wasm stub in progress_wasm.go is separately build-constrained and untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
✅ Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. The PR removes dead code (NewIndeterminateProgressBar function and its tests). Test Quality Sentinel skipped. |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
|
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR #47093 does not have the 'implementation' label and has 0 new lines of code in business logic directories (threshold: 100). |
There was a problem hiding this comment.
Pull request overview
Removes the native indeterminate progress-bar constructor and its associated golden tests.
Changes:
- Removes
NewIndeterminateProgressBar. - Removes indeterminate-mode golden test cases and helper.
Show a summary per file
| File | Description |
|---|---|
pkg/console/progress.go |
Removes the native constructor. |
pkg/console/golden_test.go |
Removes related golden tests. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Medium
| @@ -70,24 +70,6 @@ func NewProgressBar(total int64) *ProgressBar { | |||
| } | |||
| } | |||
|
|
|||
| @@ -358,16 +349,6 @@ func TestGolden_ProgressBarNonTTY(t *testing.T) { | |||
| bar := nonTTYProgressBar(0) | |||
| golden.RequireEqual(t, []byte(bar.Update(0))) | |||
| }) | |||
There was a problem hiding this comment.
Skills-Based Review\n\nApplied /codebase-design — no issues found.\n\nClean, well-scoped dead-code removal: NewIndeterminateProgressBar and its exclusive test helper and golden subtests are deleted together. No callers remain, build and tests pass.\n\nSafe to merge.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 15.8 AIC · ⌖ 7.26 AIC · ⊞ 6.7K
Comment /matt to run again
There was a problem hiding this comment.
LGTM. Clean removal of NewIndeterminateProgressBar and its exclusive test helpers/subtests, with build and tests verified.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 14.3 AIC · ⌖ 5.05 AIC · ⊞ 5K
|
🎉 This pull request is included in a new release. Release: |
Summary
Removes the dead
NewIndeterminateProgressBarfunction frompkg/console/progress.goalong with its associated test helper and golden test cases.Changes
pkg/console/progress.goNewIndeterminateProgressBar()constructor (19 lines)pkg/console/golden_test.gononTTYIndeterminateProgressBar()helper and two test casesDetails
NewIndeterminateProgressBarcreated aProgressBarin indeterminate mode (no known total) using a scaled, 40-wide progress widget with purple/info gradient. It was no longer called anywhere in the codebase.Breaking Changes
NewIndeterminateProgressBarwas a public API. Callers that imported it directly will fail to compile after this change.Testing
Two golden tests for indeterminate progress bar rendering removed together with the production code.