mirror of
https://github.com/containers/podman.git
synced 2025-07-01 00:01:02 +08:00
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>
This commit is contained in:
@ -51,6 +51,23 @@ linters:
|
|||||||
- gocritic
|
- gocritic
|
||||||
- gosec
|
- gosec
|
||||||
- maligned
|
- maligned
|
||||||
|
- gomoddirectives
|
||||||
|
- revive
|
||||||
|
- containedctx
|
||||||
|
- contextcheck
|
||||||
|
- cyclop
|
||||||
|
- errname
|
||||||
|
- forcetypeassert
|
||||||
|
- ineffassign
|
||||||
|
- ireturn
|
||||||
|
- tagliatelle
|
||||||
|
- varnamelen
|
||||||
|
- errchkjson
|
||||||
|
- maintidx
|
||||||
|
- nilerr
|
||||||
|
- wastedassign
|
||||||
|
- nilnil
|
||||||
|
- interfacer
|
||||||
linters-settings:
|
linters-settings:
|
||||||
errcheck:
|
errcheck:
|
||||||
check-blank: false
|
check-blank: false
|
||||||
|
2
Makefile
2
Makefile
@ -882,7 +882,7 @@ install.tools: .install.goimports .install.gitvalidation .install.md2man .instal
|
|||||||
|
|
||||||
.PHONY: .install.golangci-lint
|
.PHONY: .install.golangci-lint
|
||||||
.install.golangci-lint: .gopathok
|
.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
|
.PHONY: .install.bats
|
||||||
.install.bats: .gopathok
|
.install.bats: .gopathok
|
||||||
|
@ -122,7 +122,7 @@ func start(cmd *cobra.Command, args []string) error {
|
|||||||
startOptions.Stdout = os.Stdout
|
startOptions.Stdout = os.Stdout
|
||||||
}
|
}
|
||||||
|
|
||||||
var containers []string = args
|
containers := args
|
||||||
if len(filters) > 0 {
|
if len(filters) > 0 {
|
||||||
for _, f := range filters {
|
for _, f := range filters {
|
||||||
split := strings.SplitN(f, "=", 2)
|
split := strings.SplitN(f, "=", 2)
|
||||||
|
@ -1371,7 +1371,7 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p
|
|||||||
case define.JSONLogging:
|
case define.JSONLogging:
|
||||||
fallthrough
|
fallthrough
|
||||||
//lint:ignore ST1015 the default case has to be here
|
//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
|
// 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())
|
logrus.Errorf("%s logging specified but not supported. Choosing k8s-file logging instead", ctr.LogDriver())
|
||||||
fallthrough
|
fallthrough
|
||||||
|
@ -370,7 +370,7 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
|
|||||||
conn net.Conn
|
conn net.Conn
|
||||||
err error
|
err error
|
||||||
qemuSocketConn net.Conn
|
qemuSocketConn net.Conn
|
||||||
wait time.Duration = time.Millisecond * 500
|
wait = time.Millisecond * 500
|
||||||
)
|
)
|
||||||
|
|
||||||
if v.isIncompatible() {
|
if v.isIncompatible() {
|
||||||
|
Reference in New Issue
Block a user