Skip to content

Commit

Permalink
Update golangcilint to v1.49 (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismuellner committed Sep 9, 2022
1 parent 367ccaa commit 44dd0a1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@537aa1903e5d359d0b27dbc19ddd22c5087f3fbc # v3
with:
version: v1.48
version: v1.49
args: --build-tags integration,containers_image_storage_stub --timeout 300s

prepare:
Expand Down
15 changes: 1 addition & 14 deletions .golangci.yml
Expand Up @@ -15,28 +15,15 @@ linters-settings:
linters:
disable-all: true
enable:
- deadcode
- gci
- goimports
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- misspell

service:
golangci-lint-version: 1.48.x # use the fixed version to not introduce new linters unexpectedly

issues:
exclude-rules:
# These are needed because it thinks that FromUnparsedImage can't return nil, however if you go JUST 2 levels down, then you will find several cases when it can be nil
- path: src/controllers/dynakube/version/version_image.go
linters:
- staticcheck
- linters:
- staticcheck
text: "github.com/containers/image/v5/image.FromUnparsedImage never returns a nil interface value"
golangci-lint-version: 1.49.x # use the fixed version to not introduce new linters unexpectedly
2 changes: 0 additions & 2 deletions src/controllers/dynakube/version/version_image.go
Expand Up @@ -57,8 +57,6 @@ func GetImageVersion(imageName string, dockerConfig *dockerconfig.DockerConfig)
sourceImage, err := image.FromUnparsedImage(context.TODO(), systemContext, image.UnparsedInstance(imageSource, nil))
if err != nil {
return ImageVersion{}, err
} else if sourceImage == nil {
return ImageVersion{}, fmt.Errorf("could not find image: '%s'", transportImageName)
}

inspectedImage, err := sourceImage.Inspect(context.TODO())
Expand Down

0 comments on commit 44dd0a1

Please sign in to comment.