-
- Downloads
Chore: add comment, #63
-
@martina For Python we use Flake8 and Black.
A quick search gave me this:
official:
https://golang.org/doc/effective_go.html
https://github.com/golang/go/wiki/CodeReviewComments
also good:
https://github.com/uber-go/guide/blob/master/style.md
also make sure you're running gofmt or preferably goimports (gofmt + isort)
Please note, these are just ideas for a starter. I did no deep research what the best tooling for go is.
-
I did some research on pre-commit hooks for Go and most seem to be abandoned.
I would prefer using https://golangci-lint.run/. This is actually an aggregator that can be configured.
We could start by enabling gofmt and work up from there.
The current state of the code raises a lot of issues with the default set of linters.
Edited by Ernesto Rico Schmidt -
For Go the equivalent would be
goimports
. If we agree to use golang-ci, it is disabled by default, but it can be configured: https://golangci-lint.run/usage/linters/#goimportsIn the code we have a few import aliases. https://golangci-lint.run/usage/linters/#importas could be useful, and it’s also disabled by default.