Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.05 KB

CONTRIBUTING.md

File metadata and controls

29 lines (20 loc) · 1.05 KB

Contributing to holster

Go version

Use the same version as in the go.mod file.

go.mod and go.sum

go mod tidy should be called before commit to add missing and remove unused modules.

Formatting

Prior to commit all code should be formatted by the goimports tool.

How to configure IDEs

GoLand

Go to Preferences → Editor → Code style → Go → Imports → Sorting, choose "goimports".

VSCode

  1. Call go install golang.org/x/tools/cmd/goimports@latest.
  2. Install Golang extension.
  3. Go to Settings → Extensions → Format tool, choose "goimports".

Emacs, Vim, GoSublime, etc.

See goimports doc.

Linters

We are using golangci-lint for static code analysis.

In case of Lint / lint GitHub Action failure check the annotations on the PR’s Files changed tab.

You could also run make lint on your local env to check it.