Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 32732b3

Browse files
Fix linter timeout: add some concurrency
Fix linter errors due to linter bump Signed-off-by: Silvin Lubecki <[email protected]>
1 parent d484da2 commit 32732b3

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
linters:
2+
run:
3+
concurrency: 2
4+
modules-download-mode: vendor
5+
skip-dirs:
6+
- vendor
27
enable-all: false
38
disable-all: true
49
enable:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ test: test-unit test-e2e ## run all tests
6767

6868
lint: ## run linter(s)
6969
@echo "Linting..."
70-
@golangci-lint run ./...
70+
golangci-lint run --verbose --print-resources-usage --timeout 10m0s ./...
7171

7272
test-e2e: bin/$(BIN_NAME) ## run end-to-end tests
7373
@echo "Running e2e tests..."

e2e/helper_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,13 @@ func runWithDindSwarmAndRegistry(t *testing.T, todo func(dindSwarmAndRegistryInf
122122
todo(runner)
123123
}
124124

125-
func build(t *testing.T, cmd icmd.Cmd, dockerCli dockerCliCommand, ref, path string) string {
125+
func build(t *testing.T, cmd icmd.Cmd, dockerCli dockerCliCommand, ref, path string) {
126126
iidfile := fs.NewFile(t, "iid")
127127
defer iidfile.Remove()
128128
cmd.Command = dockerCli.Command("app", "build", "--iidfile", iidfile.Path(), "-t", ref, path)
129129
icmd.RunCmd(cmd).Assert(t, icmd.Success)
130-
bytes, err := ioutil.ReadFile(iidfile.Path())
130+
_, err := ioutil.ReadFile(iidfile.Path())
131131
assert.NilError(t, err)
132-
return string(bytes)
133132
}
134133

135134
// Container represents a docker container

internal/commands/image/tag_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func TestInvalidDestinationReference(t *testing.T) {
9595

9696
err := runTag(mockedImageStore, "ref", badRef)
9797

98-
assert.ErrorContains(t, err, fmt.Sprintf("invalid reference format"))
98+
assert.ErrorContains(t, err, "invalid reference format")
9999
}
100100

101101
func TestBundleNotStored(t *testing.T) {

loader/loader_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestLoadFromDirectory(t *testing.T) {
3535
app, err := LoadFromDirectory(dir.Path())
3636
assert.NilError(t, err)
3737
assert.Assert(t, app != nil)
38-
assert.Assert(t, is.Equal(app.Path, dir.Path()))
38+
assert.Assert(t, is.Equal(app.Path, dir.Path())) //nolint:staticcheck
3939
assertAppContent(t, app)
4040
}
4141

@@ -62,7 +62,7 @@ func TestLoadFromTar(t *testing.T) {
6262
app, err := LoadFromTar(myapp.Path())
6363
assert.NilError(t, err)
6464
assert.Assert(t, app != nil)
65-
assert.Assert(t, is.Equal(app.Path, myapp.Path()))
65+
assert.Assert(t, is.Equal(app.Path, myapp.Path())) //nolint:staticcheck
6666
assertAppContent(t, app)
6767
}
6868

0 commit comments

Comments
 (0)