mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-15 08:52:10 +05:30
Merge pull request #386 from thaJeztah/bump_golangci_lint
Dockerfile: update golangci-lint to v2.5
This commit is contained in:
+12
-20
@@ -1,31 +1,23 @@
|
||||
version: "2"
|
||||
run:
|
||||
timeout: 10m
|
||||
modules-download-mode: vendor
|
||||
|
||||
linters:
|
||||
default: none
|
||||
enable:
|
||||
- gofmt
|
||||
- govet
|
||||
- depguard
|
||||
- goimports
|
||||
- ineffassign
|
||||
- misspell
|
||||
- unused
|
||||
- revive
|
||||
- staticcheck
|
||||
- typecheck
|
||||
disable-all: true
|
||||
- unused
|
||||
settings:
|
||||
revive:
|
||||
rules:
|
||||
- name: package-comments # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
|
||||
disabled: true
|
||||
|
||||
linters-settings:
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: "io/ioutil"
|
||||
desc: The io/ioutil package has been deprecated. See https://go.dev/doc/go1.16#ioutil
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- revive
|
||||
text: "stutters"
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- goimports
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ ARG DEBIAN_VERSION=bookworm
|
||||
|
||||
ARG XX_VERSION=1.6.1
|
||||
ARG OSXCROSS_VERSION=11.3-r7-debian
|
||||
ARG GOLANGCI_LINT_VERSION=v1.64.5
|
||||
ARG GOLANGCI_LINT_VERSION=v2.5
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ARG PACKAGE=github.com/docker/docker-credential-helpers
|
||||
|
||||
+2
-2
@@ -83,10 +83,10 @@ func TestPassHelperList(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
for server, username := range credsList {
|
||||
if !(strings.HasSuffix(server, "2376/v1") || strings.HasSuffix(server, "2375/v1")) {
|
||||
if !strings.HasSuffix(server, "2376/v1") && !strings.HasSuffix(server, "2375/v1") {
|
||||
t.Errorf("invalid url: %s", server)
|
||||
}
|
||||
if !(username == "foo" || username == "bar") {
|
||||
if username != "foo" && username != "bar" {
|
||||
t.Errorf("invalid username: %v", username)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user