Skip to content

golangci-lint reports errors #222

@bart0sh

Description

@bart0sh

We may want to fix this and run golangci-lint in our CI. It would require an API change, so it's probably better to do it before we release 1.0.

~/git/container-device-interface (main) $ golangci-lint run 
pkg/cdi/cache.go:119:11: Error return value of `c.refresh` is not checked (errcheck)
        c.refresh()
                 ^
pkg/cdi/cache.go:236:21: Error return value of `c.refreshIfRequired` is not checked (errcheck)
        c.refreshIfRequired(false)
                           ^
pkg/cdi/cache.go:343:21: Error return value of `c.refreshIfRequired` is not checked (errcheck)
        c.refreshIfRequired(false)
                           ^
pkg/cdi/cache.go:355:21: Error return value of `c.refreshIfRequired` is not checked (errcheck)
        c.refreshIfRequired(false)
                           ^
pkg/cdi/cache.go:547:11: Error return value is not checked (errcheck)
                        refresh()
                               ^
pkg/cdi/default-cache_test.go:118:13: Error return value is not checked (errcheck)
                        Configure(opts...)
                                 ^
pkg/cdi/default-cache_test.go:264:16: Error return value is not checked (errcheck)
                                                Configure(opts...)
                                                         ^
pkg/cdi/spec-dirs_test.go:189:4: ineffectual assignment to err (ineffassign)
                        err = scanSpecDirs(dirs, func(path string, prio int, spec *Spec, err error) error {
                        ^

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions