diff options
author | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-21 10:28:35 +0100 |
---|---|---|
committer | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-21 10:42:53 +0100 |
commit | 026bd9b2055fd65f7eabf1f2d435e43e3801cf84 (patch) | |
tree | ce98688fa2b8d3dcef9ad891f13414d5225d2352 | |
parent | 447e947aed160de86d1bb3d2f09a3628a25a7511 (diff) | |
download | podman-026bd9b2055fd65f7eabf1f2d435e43e3801cf84.tar.gz podman-026bd9b2055fd65f7eabf1f2d435e43e3801cf84.tar.bz2 podman-026bd9b2055fd65f7eabf1f2d435e43e3801cf84.zip |
bump golangci-lint to v1.45.0
* supports Go 1.18
* disable a number of new linters
* fix minor stylecheck issues
[NO NEW TESTS NEEDED]
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
-rw-r--r-- | .golangci.yml | 17 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cmd/podman/containers/start.go | 2 | ||||
-rw-r--r-- | libpod/oci_conmon_linux.go | 2 | ||||
-rw-r--r-- | pkg/machine/qemu/machine.go | 2 |
5 files changed, 21 insertions, 4 deletions
diff --git a/.golangci.yml b/.golangci.yml index f3338b9ae..c9c9ec2ac 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -51,6 +51,23 @@ linters: - gocritic - gosec - maligned + - gomoddirectives + - revive + - containedctx + - contextcheck + - cyclop + - errname + - forcetypeassert + - ineffassign + - ireturn + - tagliatelle + - varnamelen + - errchkjson + - maintidx + - nilerr + - wastedassign + - nilnil + - interfacer linters-settings: errcheck: check-blank: false @@ -882,7 +882,7 @@ install.tools: .install.goimports .install.gitvalidation .install.md2man .instal .PHONY: .install.golangci-lint .install.golangci-lint: .gopathok - VERSION=1.36.0 GOBIN=$(GOBIN) ./hack/install_golangci.sh + VERSION=1.45.0 GOBIN=$(GOBIN) ./hack/install_golangci.sh .PHONY: .install.bats .install.bats: .gopathok diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go index a7731a0a1..b70e975b7 100644 --- a/cmd/podman/containers/start.go +++ b/cmd/podman/containers/start.go @@ -122,7 +122,7 @@ func start(cmd *cobra.Command, args []string) error { startOptions.Stdout = os.Stdout } - var containers []string = args + containers := args if len(filters) > 0 { for _, f := range filters { split := strings.SplitN(f, "=", 2) diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index 735b1f09b..0e8aed93a 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -1371,7 +1371,7 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p case define.JSONLogging: fallthrough //lint:ignore ST1015 the default case has to be here - default: //nolint-stylecheck + default: //nolint:stylecheck // No case here should happen except JSONLogging, but keep this here in case the options are extended logrus.Errorf("%s logging specified but not supported. Choosing k8s-file logging instead", ctr.LogDriver()) fallthrough diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index d30e51215..46f838f8b 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -370,7 +370,7 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error { conn net.Conn err error qemuSocketConn net.Conn - wait time.Duration = time.Millisecond * 500 + wait = time.Millisecond * 500 ) if v.isIncompatible() { |