hzeller / stuff-org

Organize electronic components. Or other stuff.
34 stars 11 forks source link

Fix various linter errors #31

Closed SuperQ closed 1 year ago

SuperQ commented 1 year ago

Fix a number of issues found by golangci-lint.

SuperQ commented 1 year ago

Ok, I've reduced the linter errors to this list:

stuff/dbbackend.go:266:16: Error return value of `d.joinSet.Exec` is not checked (errcheck)
    d.joinSet.Exec(id, set)
                  ^
stuff/dbbackend.go:276:18: Error return value of `d.leaveSet.Exec` is not checked (errcheck)
        d.leaveSet.Exec(id, c.Equiv_set)
                       ^
stuff/search-handler.go:175:16: Error return value of `pusher.Push` is not checked (errcheck)
                pusher.Push(imgUrl, nil)
                           ^
hzeller commented 1 year ago

How can I run the linter locally ?

SuperQ commented 1 year ago

https://golangci-lint.run/usage/install/#local-installation

hzeller commented 1 year ago

Ah nice. I found that golangci-lint is available in nix already and now added linting.

SuperQ commented 1 year ago

Cool, I can add it to the actions once all the current issues are fixed.

hzeller commented 1 year ago

Alright, lint is now happy,