Skip to content

Commit 20527eb

Browse files
committed
fix: Addressing long lines
1 parent 45a529f commit 20527eb

4 files changed

Lines changed: 31 additions & 6 deletions

File tree

internal/cli/commands/catalog/tui/redesign/export_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ import (
77
// NewCopyFinishedMsgForTest constructs the private copyFinishedMsg so
88
// external tests can drive Model.Update through the copy-exit code path
99
// without spinning up a real bubbletea runtime.
10-
func NewCopyFinishedMsgForTest(err error, workingDir string, required []string, optional []string, valuesWritten, valuesSkipped bool) tea.Msg {
10+
func NewCopyFinishedMsgForTest(
11+
err error,
12+
workingDir string,
13+
required []string,
14+
optional []string,
15+
valuesWritten, valuesSkipped bool,
16+
) tea.Msg {
1117
opt := make([]OptionalValue, 0, len(optional))
1218
for _, name := range optional {
1319
opt = append(opt, OptionalValue{Name: name})

internal/cli/commands/catalog/tui/redesign/synctest_helpers_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ func driveModel(t *testing.T, m tea.Model, width, height int, interact []tea.Msg
151151
}
152152

153153
if iter == settleMaxIterations-1 {
154-
t.Fatalf("driveModel: bubble did not settle within %d iterations; a cmd is likely re-arming itself instantly and preventing the fake clock from advancing", settleMaxIterations)
154+
t.Fatalf(
155+
"driveModel: bubble did not settle within %d iterations; "+
156+
"a cmd is likely re-arming itself instantly and "+
157+
"preventing the fake clock from advancing",
158+
settleMaxIterations,
159+
)
155160
}
156161

157162
return m

internal/cli/commands/catalog/tui/redesign/view_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ func TestWelcomeLoadingView_StatusTextUpdates(t *testing.T) {
5656

5757
content = stripANSI(m.View().Content)
5858
assert.Contains(t, content, "Loading terraform-aws-vpc...", "status text should update after StatusUpdateMsg")
59-
assert.NotContains(t, content, "Discovering components from your infrastructure...", "old status text should be replaced")
59+
assert.NotContains(t, content,
60+
"Discovering components from your infrastructure...",
61+
"old status text should be replaced")
6062
}
6163

6264
// --- Welcome No-Sources View ---
@@ -278,7 +280,11 @@ func TestWelcomeStreamingFlow_Synctest(t *testing.T) {
278280
components := makeComponents(t)
279281
require.GreaterOrEqual(t, len(components), 2, "need at least 2 components")
280282

281-
streamingLoad := func(_ context.Context, status redesign.StatusFunc, componentCh chan<- *redesign.ComponentEntry) error {
283+
streamingLoad := func(
284+
_ context.Context,
285+
status redesign.StatusFunc,
286+
componentCh chan<- *redesign.ComponentEntry,
287+
) error {
282288
status("Discovering catalog sources...")
283289

284290
for _, c := range components {

internal/cli/commands/catalog/tui/redesign/welcome_test.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ func TestWelcomeLoadingScreen_TransitionsToComponentList(t *testing.T) {
108108
l := logger.CreateLogger()
109109
components := makeComponents(t)
110110

111-
withComponentsLoad := func(_ context.Context, _ redesign.StatusFunc, componentCh chan<- *redesign.ComponentEntry) error {
111+
withComponentsLoad := func(
112+
_ context.Context,
113+
_ redesign.StatusFunc,
114+
componentCh chan<- *redesign.ComponentEntry,
115+
) error {
112116
for _, c := range components {
113117
componentCh <- c
114118
}
@@ -141,7 +145,11 @@ func TestWelcomeLoadingScreen_ComponentListNavigation(t *testing.T) {
141145
l := logger.CreateLogger()
142146
components := makeComponents(t)
143147

144-
withComponentsLoad := func(_ context.Context, _ redesign.StatusFunc, componentCh chan<- *redesign.ComponentEntry) error {
148+
withComponentsLoad := func(
149+
_ context.Context,
150+
_ redesign.StatusFunc,
151+
componentCh chan<- *redesign.ComponentEntry,
152+
) error {
145153
for _, c := range components {
146154
componentCh <- c
147155
}

0 commit comments

Comments
 (0)