marcosnils / bin

Effortless binary manager
MIT License
685 stars 46 forks source link

Add linting #62

Closed marcosnils closed 3 years ago

marcosnils commented 3 years ago

Bin could use some linting :cupid:

sirlatrom commented 3 years ago

Some linting done in in #63

breml commented 3 years ago

I recommend golangci-lint for linting Go projects.

This linter supports a large set of different linters and one can configure the linting according to the needs (and personal preference). With the default settings, there are currently quite some issues listed. Most of them are related to errors not being checked and unused code.

breml commented 3 years ago

And if you want to go more strict on the source code formatting, I recommend gofumpt (also part of gopls, it can be enabled as default formatting in e.g. vs code Go plugin).

bin install github.com/mvdan/gofumpt
gofumpt -w -s -l .