Skip to content

Commit 26536bf

Browse files
authored
Move tools to tools/go.mod; add golangci-lint there; update it to 2.5.0 (#3722)
## Changes - Move yamlfmt, gotestsum, and golangci-lint into a tools module that pins their versions - This pins golangci-lint as 2.5.0 which adds "no naked return" in gofumpt so this PR updates the code that triggers it. - We no longer use golangci-lint github action, the same command/version that is configured in tools/go.mod is used on CI as well. - Pre-build golangci-lint in Makefile, this takes 0.5s of start time on my machine. - Configure dependabot to manage tools/go.mod ## Why Relying on system golangci-lint results in people (and agents) running into issue due to version mismatch. This manages the version inside the repo, so everyone is one the same version and updates go through PR + testing. ------ https://chatgpt.com/codex/tasks/task_e_68e1967083908325baa2939b043cae54 Original PR: denik#3
1 parent ee1b500 commit 26536bf

File tree

17 files changed

+1295
-80
lines changed

17 files changed

+1295
-80
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
- package-ecosystem: "gomod"
8+
directory: "/tools"
9+
schedule:
10+
interval: "weekly"
711
- package-ecosystem: "github-actions"
812
directory: "/"
913
schedule:

.github/workflows/push.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ jobs:
116116
# Exit with status code 1 if there are differences (i.e. unformatted files)
117117
git diff --exit-code
118118
- name: Run Go lint checks (does not include formatting checks)
119-
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
120-
with:
121-
version: v2.4.0
122-
args: --timeout=15m
119+
run: go tool -modfile=tools/go.mod golangci-lint run --timeout=15m
123120
- name: Run ruff (Python linter and formatter)
124121
uses: astral-sh/ruff-action@0c50076f12c38c3d0115b7b519b54a91cb9cf0ad # v3.5.0
125122
with:

Makefile

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,45 @@ default: checks fmt lint
22

33
PACKAGES=./acceptance/... ./libs/... ./internal/... ./cmd/... ./bundle/... ./experimental/ssh/... .
44

5+
GO_TOOL ?= go tool -modfile=tools/go.mod
56
GOTESTSUM_FORMAT ?= pkgname-and-test-fails
6-
GOTESTSUM_CMD ?= go tool gotestsum --format ${GOTESTSUM_FORMAT} --no-summary=skipped --jsonfile test-output.json
7+
GOTESTSUM_CMD ?= ${GO_TOOL} gotestsum --format ${GOTESTSUM_FORMAT} --no-summary=skipped --jsonfile test-output.json
78
LOCAL_TIMEOUT ?= 30m
89

910

10-
lintfull:
11-
golangci-lint run --fix
11+
lintfull: ./tools/golangci-lint
12+
./tools/golangci-lint run --fix
1213

13-
lint:
14-
./tools/lintdiff.py run --fix
14+
lint: ./tools/golangci-lint
15+
./tools/lintdiff.py ./tools/golangci-lint run --fix
1516

1617
tidy:
1718
@# not part of golangci-lint, apparently
1819
go mod tidy
1920

20-
lintcheck:
21-
golangci-lint run ./...
21+
lintcheck: ./tools/golangci-lint
22+
./tools/golangci-lint run ./...
2223

23-
fmtfull: tools/yamlfmt
24+
fmtfull: ./tools/golangci-lint ./tools/yamlfmt
2425
ruff format -n
25-
golangci-lint fmt
26+
./tools/golangci-lint fmt
2627
./tools/yamlfmt .
2728

28-
fmt: tools/yamlfmt
29+
fmt: ./tools/golangci-lint ./tools/yamlfmt
2930
ruff format -n
30-
./tools/lintdiff.py fmt
31+
./tools/lintdiff.py ./tools/golangci-lint fmt
3132
./tools/yamlfmt .
3233

33-
# pre-building yamlfmt because I also want to call it from tests
34-
tools/yamlfmt: go.mod
35-
go build -o tools/yamlfmt github.com/google/yamlfmt/cmd/yamlfmt
34+
# pre-building yamlfmt because it is invoked from tests and scripts
35+
tools/yamlfmt: tools/go.mod tools/go.sum
36+
go build -modfile=tools/go.mod -o tools/yamlfmt github.com/google/yamlfmt/cmd/yamlfmt
3637

37-
tools/yamlfmt.exe: go.mod
38-
go build -o tools/yamlfmt.exe github.com/google/yamlfmt/cmd/yamlfmt
38+
tools/yamlfmt.exe: tools/go.mod tools/go.sum
39+
go build -modfile=tools/go.mod -o tools/yamlfmt.exe github.com/google/yamlfmt/cmd/yamlfmt
40+
41+
# pre-building golangci-lint because it's faster to run pre-built version
42+
tools/golangci-lint: tools/go.mod tools/go.sum
43+
go build -modfile=tools/go.mod -o tools/golangci-lint github.com/golangci/golangci-lint/v2/cmd/golangci-lint
3944

4045
ws:
4146
./tools/validate_whitespace.py
@@ -65,7 +70,7 @@ test-update-aws:
6570
test-update-all: test-update test-update-aws
6671

6772
slowest:
68-
go tool gotestsum tool slowest --jsonfile test-output.json --threshold 1s --num 50
73+
${GO_TOOL} gotestsum tool slowest --jsonfile test-output.json --threshold 1s --num 50
6974

7075
cover:
7176
rm -fr ./acceptance/build/cover/
@@ -102,7 +107,7 @@ schema:
102107
docs:
103108
go run ./bundle/docsgen ./bundle/internal/schema ./bundle/docsgen
104109

105-
INTEGRATION = go tool gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./acceptance ./integration/..." -- -parallel 4 -timeout=2h
110+
INTEGRATION = ${GO_TOOL} gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./acceptance ./integration/..." -- -parallel 4 -timeout=2h
106111

107112
integration:
108113
$(INTEGRATION)

bundle/internal/tf/codegen/schema/generate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (s *Schema) installTerraform(ctx context.Context) (path string, err error)
3838
installDir := filepath.Join(s.WorkingDir, "bin")
3939
err = os.MkdirAll(installDir, 0o755)
4040
if err != nil {
41-
return
41+
return path, err
4242
}
4343

4444
installer := &releases.ExactVersion{
@@ -50,7 +50,7 @@ func (s *Schema) installTerraform(ctx context.Context) (path string, err error)
5050
installer.SetLogger(log.Default())
5151

5252
path, err = installer.Install(ctx)
53-
return
53+
return path, err
5454
}
5555

5656
func (s *Schema) generateSchema(ctx context.Context, execPath string) error {

cmd/labs/project/login.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ func (lc *loginConfig) askWorkspace(ctx context.Context, cfg *config.Config) (*d
4848
func (lc *loginConfig) askWorkspaceProfile(ctx context.Context, cfg *config.Config) (err error) {
4949
if cfg.Profile != "" {
5050
lc.WorkspaceProfile = cfg.Profile
51-
return
51+
return err
5252
}
5353
if !cmdio.IsPromptSupported(ctx) {
5454
return ErrNotInTTY
5555
}
5656
lc.WorkspaceProfile, err = root.AskForWorkspaceProfile(ctx)
5757
cfg.Profile = lc.WorkspaceProfile
58-
return
58+
return err
5959
}
6060

6161
func (lc *loginConfig) askCluster(ctx context.Context, w *databricks.WorkspaceClient) (err error) {
6262
if !lc.NeedsCluster() {
63-
return
63+
return err
6464
}
6565
if w.Config.ClusterID != "" {
6666
lc.ClusterID = w.Config.ClusterID
67-
return
67+
return err
6868
}
6969
if !cmdio.IsPromptSupported(ctx) {
7070
return ErrNotInTTY
@@ -76,23 +76,23 @@ func (lc *loginConfig) askCluster(ctx context.Context, w *databricks.WorkspaceCl
7676
}
7777
w.Config.ClusterID = clusterID
7878
lc.ClusterID = clusterID
79-
return
79+
return err
8080
}
8181

8282
func (lc *loginConfig) askWarehouse(ctx context.Context, w *databricks.WorkspaceClient) (err error) {
8383
if !lc.NeedsWarehouse() {
84-
return
84+
return err
8585
}
8686
if w.Config.WarehouseID != "" {
8787
lc.WarehouseID = w.Config.WarehouseID
88-
return
88+
return err
8989
}
9090
if !cmdio.IsPromptSupported(ctx) {
9191
return ErrNotInTTY
9292
}
9393
lc.WarehouseID, err = cfgpickers.AskForWarehouse(ctx, w,
9494
cfgpickers.WithWarehouseTypes(lc.Installer.WarehouseTypes...))
95-
return
95+
return err
9696
}
9797

9898
func (lc *loginConfig) askAccountProfile(ctx context.Context, cfg *config.Config) (err error) {
@@ -104,7 +104,7 @@ func (lc *loginConfig) askAccountProfile(ctx context.Context, cfg *config.Config
104104
}
105105
lc.AccountProfile, err = root.AskForAccountProfile(ctx)
106106
cfg.Profile = lc.AccountProfile
107-
return
107+
return err
108108
}
109109

110110
func (lc *loginConfig) save(ctx context.Context) error {

cmd/root/bundle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func getProfile(cmd *cobra.Command) (value string) {
5252
if flag != nil {
5353
value = flag.Value.String()
5454
if value != "" {
55-
return
55+
return value
5656
}
5757
}
5858

go.mod

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,20 @@ require (
4646
cloud.google.com/go/compute/metadata v0.8.4 // indirect
4747
github.com/ProtonMail/go-crypto v1.1.6 // indirect
4848
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
49-
github.com/bitfield/gotestdox v0.2.2 // indirect
50-
github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect
5149
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
5250
github.com/cloudflare/circl v1.6.1 // indirect
5351
github.com/davecgh/go-spew v1.1.1 // indirect
54-
github.com/dnephin/pflag v1.0.7 // indirect
5552
github.com/felixge/httpsnoop v1.0.4 // indirect
56-
github.com/fsnotify/fsnotify v1.8.0 // indirect
5753
github.com/go-logr/logr v1.4.3 // indirect
5854
github.com/go-logr/stdr v1.2.2 // indirect
59-
github.com/google/go-cmp v0.7.0 // indirect
6055
github.com/google/go-querystring v1.1.0 // indirect
6156
github.com/google/s2a-go v0.1.9 // indirect
62-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
63-
github.com/google/yamlfmt v0.17.0 // indirect
6457
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
6558
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
6659
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
6760
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
6861
github.com/inconshreveable/mousetrap v1.1.0 // indirect
6962
github.com/mattn/go-colorable v0.1.13 // indirect
70-
github.com/mitchellh/mapstructure v1.5.0 // indirect
7163
github.com/pmezard/go-difflib v1.0.0 // indirect
7264
github.com/stretchr/objx v0.5.2 // indirect
7365
github.com/zclconf/go-cty v1.16.4 // indirect
@@ -78,15 +70,8 @@ require (
7870
go.opentelemetry.io/otel/trace v1.38.0 // indirect
7971
golang.org/x/net v0.44.0 // indirect
8072
golang.org/x/time v0.13.0 // indirect
81-
golang.org/x/tools v0.37.0 // indirect
8273
google.golang.org/api v0.249.0 // indirect
8374
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 // indirect
8475
google.golang.org/grpc v1.75.1 // indirect
8576
google.golang.org/protobuf v1.36.9 // indirect
86-
gotest.tools/gotestsum v1.12.1 // indirect
87-
)
88-
89-
tool (
90-
github.com/google/yamlfmt/cmd/yamlfmt
91-
gotest.tools/gotestsum
9277
)

go.sum

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNx
1616
github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
1717
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
1818
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
19-
github.com/bitfield/gotestdox v0.2.2 h1:x6RcPAbBbErKLnapz1QeAlf3ospg8efBsedU93CDsnE=
20-
github.com/bitfield/gotestdox v0.2.2/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY=
21-
github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
22-
github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
2319
github.com/briandowns/spinner v1.23.1 h1:t5fDPmScwUjozhDj4FA46p5acZWIPXYE30qW2Ptu650=
2420
github.com/briandowns/spinner v1.23.1/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM=
2521
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
@@ -38,17 +34,13 @@ github.com/databricks/databricks-sdk-go v0.85.0/go.mod h1:hWoHnHbNLjPKiTm5K/7bcI
3834
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3935
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
4036
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
41-
github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk=
42-
github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE=
4337
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
4438
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
4539
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
4640
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
4741
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
4842
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
4943
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
50-
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
51-
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
5244
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
5345
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
5446
github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM=
@@ -71,12 +63,8 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD
7163
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
7264
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
7365
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
74-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
75-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
7666
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
7767
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
78-
github.com/google/yamlfmt v0.17.0 h1:/tdp01rIlvLz3LgJ2NtMLnqgAadZm33P7GcPU680b+w=
79-
github.com/google/yamlfmt v0.17.0/go.mod h1:gs0UEklJOYkUJ+OOCG0hg9n+DzucKDPlJElTUasVNK8=
8068
github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4=
8169
github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
8270
github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo=
@@ -121,8 +109,6 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA
121109
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
122110
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
123111
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
124-
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
125-
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
126112
github.com/nwidger/jsoncolor v0.3.2 h1:rVJJlwAWDJShnbTYOQ5RM7yTA20INyKXlJ/fg4JMhHQ=
127113
github.com/nwidger/jsoncolor v0.3.2/go.mod h1:Cs34umxLbJvgBMnVNVqhji9BhoT/N/KinHqZptQ7cf4=
128114
github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4=
@@ -199,8 +185,6 @@ golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
199185
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
200186
golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI=
201187
golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
202-
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
203-
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
204188
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
205189
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
206190
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
@@ -222,7 +206,3 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN
222206
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
223207
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
224208
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
225-
gotest.tools/gotestsum v1.12.1 h1:dvcxFBTFR1QsQmrCQa4k/vDXow9altdYz4CjdW+XeBE=
226-
gotest.tools/gotestsum v1.12.1/go.mod h1:mwDmLbx9DIvr09dnAoGgQPLaSXszNpXpWo2bsQge5BE=
227-
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
228-
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=

libs/cmdio/io.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ func (c *cmdIO) Select(items []Tuple, label string) (id string, err error) {
138138
Stdin: io.NopCloser(c.in),
139139
}).Run()
140140
if err != nil {
141-
return
141+
return id, err
142142
}
143143
id = items[idx].Id
144-
return
144+
return id, err
145145
}
146146

147147
// Show a selection prompt where the user can pick one of the name/id items.

libs/databrickscfg/profile/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (f FileProfilerImpl) LoadProfiles(ctx context.Context, fn ProfileMatchFunct
8989
}
9090
}
9191

92-
return
92+
return profiles, err
9393
}
9494

9595
func ProfileCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {

0 commit comments

Comments
 (0)