mirror of
https://github.com/containers/skopeo.git
synced 2025-05-03 21:46:27 +00:00
Merge pull request #2556 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2
This commit is contained in:
commit
f37a82cddf
@ -1,3 +1,11 @@
|
|||||||
---
|
version: "2"
|
||||||
run:
|
linters:
|
||||||
timeout: 5m
|
settings:
|
||||||
|
staticcheck:
|
||||||
|
checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1005"] # golangci-lint's default, we add -ST1005
|
||||||
|
exclusions:
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
2
Makefile
2
Makefile
@ -27,7 +27,7 @@ GOARCH ?= $(shell go env GOARCH)
|
|||||||
# N/B: This value is managed by Renovate, manual changes are
|
# N/B: This value is managed by Renovate, manual changes are
|
||||||
# possible, as long as they don't disturb the formatting
|
# possible, as long as they don't disturb the formatting
|
||||||
# (i.e. DO NOT ADD A 'v' prefix!)
|
# (i.e. DO NOT ADD A 'v' prefix!)
|
||||||
GOLANGCI_LINT_VERSION := 1.64.8
|
GOLANGCI_LINT_VERSION := 2.0.0
|
||||||
|
|
||||||
ifeq ($(GOBIN),)
|
ifeq ($(GOBIN),)
|
||||||
GOBIN := $(GOPATH)/bin
|
GOBIN := $(GOPATH)/bin
|
||||||
|
@ -200,8 +200,8 @@ func (opts *imageOptions) newSystemContext() (*types.SystemContext, error) {
|
|||||||
ctx.AuthFilePath = opts.shared.authFilePath
|
ctx.AuthFilePath = opts.shared.authFilePath
|
||||||
ctx.DockerDaemonHost = opts.dockerDaemonHost
|
ctx.DockerDaemonHost = opts.dockerDaemonHost
|
||||||
ctx.DockerDaemonCertPath = opts.dockerCertPath
|
ctx.DockerDaemonCertPath = opts.dockerCertPath
|
||||||
if opts.dockerImageOptions.authFilePath.Present() {
|
if opts.authFilePath.Present() {
|
||||||
ctx.AuthFilePath = opts.dockerImageOptions.authFilePath.Value()
|
ctx.AuthFilePath = opts.authFilePath.Value()
|
||||||
}
|
}
|
||||||
if opts.deprecatedTLSVerify != nil && opts.deprecatedTLSVerify.tlsVerify.Present() {
|
if opts.deprecatedTLSVerify != nil && opts.deprecatedTLSVerify.tlsVerify.Present() {
|
||||||
// If both this deprecated option and a non-deprecated option is present, we use the latter value.
|
// If both this deprecated option and a non-deprecated option is present, we use the latter value.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
errors=$($GOBIN/golangci-lint run --build-tags "${BUILDTAGS}" 2>&1)
|
errors=$($GOBIN/golangci-lint run --build-tags "${BUILDTAGS}" 2>&1)
|
||||||
|
|
||||||
if [ -z "$errors" ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo 'Congratulations! All Go source files have been linted.'
|
echo 'Congratulations! All Go source files have been linted.'
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user