forked from mailgun/holster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DSU-1270 Add contributing guide (mailgun#138)
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Contributing to holster | ||
|
||
## Go version | ||
Use the same version as in the [go.mod](https://github.com/mailgun/holster/blob/master/go.mod#L3) 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](https://pkg.go.dev/golang.org/x/tools/cmd/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`. | ||
1. Install Golang extension. | ||
1. Go to Settings → Extensions → Format tool, choose "goimports". | ||
|
||
#### Emacs, Vim, GoSublime, etc. | ||
See [goimports doc](https://pkg.go.dev/golang.org/x/tools/cmd/goimports?tab=doc). | ||
|
||
## Linters | ||
We are using [golangci-lint](https://golangci-lint.run/) 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters