Skip to content

Commit ec5efac

Browse files
authored
Merge pull request #386 from thaJeztah/bump_golangci_lint
Dockerfile: update golangci-lint to v2.5
2 parents 8154b98 + 4142982 commit ec5efac

File tree

3 files changed

+15
-23
lines changed

3 files changed

+15
-23
lines changed

.golangci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
1+
version: "2"
12
run:
2-
timeout: 10m
33
modules-download-mode: vendor
44

55
linters:
6+
default: none
67
enable:
7-
- gofmt
88
- govet
9-
- depguard
10-
- goimports
119
- ineffassign
1210
- misspell
13-
- unused
1411
- revive
1512
- staticcheck
16-
- typecheck
17-
disable-all: true
18-
19-
linters-settings:
20-
depguard:
21-
rules:
22-
main:
23-
deny:
24-
- pkg: "io/ioutil"
25-
desc: The io/ioutil package has been deprecated. See https://go.dev/doc/go1.16#ioutil
13+
- unused
14+
settings:
15+
revive:
16+
rules:
17+
- name: package-comments # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
18+
disabled: true
2619

27-
issues:
28-
exclude-rules:
29-
- linters:
30-
- revive
31-
text: "stutters"
20+
formatters:
21+
enable:
22+
- gofmt
23+
- goimports

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG DEBIAN_VERSION=bookworm
55

66
ARG XX_VERSION=1.6.1
77
ARG OSXCROSS_VERSION=11.3-r7-debian
8-
ARG GOLANGCI_LINT_VERSION=v1.64.5
8+
ARG GOLANGCI_LINT_VERSION=v2.5
99
ARG DEBIAN_FRONTEND=noninteractive
1010

1111
ARG PACKAGE=github.com/docker/docker-credential-helpers

pass/pass_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ func TestPassHelperList(t *testing.T) {
8383
t.Error(err)
8484
}
8585
for server, username := range credsList {
86-
if !(strings.HasSuffix(server, "2376/v1") || strings.HasSuffix(server, "2375/v1")) {
86+
if !strings.HasSuffix(server, "2376/v1") && !strings.HasSuffix(server, "2375/v1") {
8787
t.Errorf("invalid url: %s", server)
8888
}
89-
if !(username == "foo" || username == "bar") {
89+
if username != "foo" && username != "bar" {
9090
t.Errorf("invalid username: %v", username)
9191
}
9292

0 commit comments

Comments
 (0)