Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golangci-lint reports errors #222

Open
Tracked by #206
bart0sh opened this issue Aug 9, 2024 · 0 comments
Open
Tracked by #206

golangci-lint reports errors #222

bart0sh opened this issue Aug 9, 2024 · 0 comments

Comments

@bart0sh
Copy link
Contributor

bart0sh commented Aug 9, 2024

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 {
                        ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant