probonopd / go-appimage

Go implementation of AppImage tools
MIT License
756 stars 74 forks source link

Support golangci-linter #257

Open lcd1232 opened 1 year ago

lcd1232 commented 1 year ago
probonopd commented 1 year ago

Thanks @lcd1232

Getting


Error: ../internal/helpers/appdir.go:157:16: undefined: errors.Join
Error: ../internal/helpers/appdir.go:177:16: undefined: errors.Join
note: module requires Go 1.20
Error: Process completed with exit code 2.

Do you know what is going on there?

lcd1232 commented 1 year ago

@probonopd it seems like you have go version lower than go1.20. Could you check what's your version using go version?

probonopd commented 1 year ago

Isn't this where you set it?

https://github.com/probonopd/go-appimage/blob/42e24a35e10eb0c661e18f565c734a3555ce9665/.github/workflows/lint.yml#L10

probonopd commented 1 year ago

Thank you very much. Looks like it is working as intended now?

@CalebQ42 how do you like this?

CalebQ42 commented 1 year ago

Ultimately I think having a consistent linter strategy is a good thing, but I'm not sure golangci-linter is a good choice. It doesn't seem to provides any tangible benefits vs using a single linter. I personally have been using staticcheck since it's the default for VS Code and golangci-linter didn't seem to catch anything new in this project or any of my other projects. Additionally on golangci-linter's own website it says it includes staticcheck even though it's author is against it, which turns me off enough that I personally won't be using it in my personal projects.