Skip to content
Snippets Groups Projects
Commit c79f330d authored by Martina Müller's avatar Martina Müller
Browse files

Chore: add comment, #63

parent 42d60a62
Branches
Tags
No related merge requests found
Loading
  • @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
  • Sounds good. Maybe isort makes also sense, since it's simple and we use it with Python too.

  • 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/#goimports

    In 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.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment