Skip to content

Commit f20ed4e

Browse files
cpcloudclaude
andcommitted
fix: address lint findings from rebase
- Replace string concat loop with strings.Repeat (perfsprint) - Use require.Positive/assert.Positive instead of Greater(x, 0) (testifylint) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 78ca4bc commit f20ed4e

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

internal/app/extraction_render.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,8 @@ func (m *Model) buildExtractionPipelineOverlay(
164164
// doesn't shrink when a shorter tab is displayed.
165165
actualLines := strings.Count(previewSection, "\n")
166166
targetLines := previewLines - 2 // -2: sep+blank added as separate parts
167-
for actualLines < targetLines {
168-
previewSection += "\n"
169-
actualLines++
167+
if pad := targetLines - actualLines; pad > 0 {
168+
previewSection += strings.Repeat("\n", pad)
170169
}
171170
}
172171
}

internal/app/extraction_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3667,9 +3667,9 @@ func TestExploreMode_HintBarTrailingOrder(t *testing.T) {
36673667
pipelineAcceptIdx := hintIndex(pipelinePlain, "accept")
36683668
pipelineExploreIdx := hintIndex(pipelinePlain, "explore")
36693669
pipelineEscIdx := hintIndex(pipelinePlain, "discard")
3670-
require.Greater(t, pipelineAcceptIdx, 0, "accept hint should appear")
3671-
require.Greater(t, pipelineExploreIdx, 0, "explore hint should appear")
3672-
require.Greater(t, pipelineEscIdx, 0, "discard hint should appear")
3670+
require.Positive(t, pipelineAcceptIdx, "accept hint should appear")
3671+
require.Positive(t, pipelineExploreIdx, "explore hint should appear")
3672+
require.Positive(t, pipelineEscIdx, "discard hint should appear")
36733673
assert.Less(t, pipelineAcceptIdx, pipelineExploreIdx,
36743674
"accept should come before explore")
36753675
assert.Less(t, pipelineExploreIdx, pipelineEscIdx,
@@ -3804,7 +3804,7 @@ func TestExploreMode_UnknownTableOverlayStable(t *testing.T) {
38043804
plain := ansi.Strip(out)
38053805
lines := strings.Count(out, "\n")
38063806

3807-
assert.Greater(t, lines, 0, "overlay should render with nonzero height")
3807+
assert.Positive(t, lines, "overlay should render with nonzero height")
38083808
assert.Contains(t, plain, "no operations",
38093809
"should show fallback text for unknown tables")
38103810

0 commit comments

Comments
 (0)