Skip to content

Commit f0d4584

Browse files
committed
CONTRIBUTING_GO: document linter and formatter
Signed-off-by: Paul Holzinger <[email protected]>
1 parent a76be0a commit f0d4584

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CONTRIBUTING_GO.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ At present, this means the following repositories:
1414
## Topics
1515

1616
* [Unit Tests](#unit-tests)
17+
* [Go Format and lint](#go-format-and-lint)
1718
* [Go Dependency updates](#go-dependency-updates)
1819
* [Testing changes in a dependent repository](#testing-changes-in-a-dependent-repository)
1920
* [git bisect a change in a Go dependency](#git-bisect-a-change-in-a-go-dependency)
@@ -23,6 +24,11 @@ At present, this means the following repositories:
2324
Unit tests for Go code are added in a separate file within the same directory, named `..._test.go` (where the first part of the name is often the name of the file whose code is being tested).
2425
Our Go projects to not require unit tests, but contributors are strongly encouraged to unit test any code that can have a reasonable unit test written.
2526

27+
### Go Format and lint
28+
29+
We are using the [`gofumpt`](https://github.com/mvdan/gofumpt) formatter for our go code, you can either use it directly or format via `make fmt`.
30+
For linting we use [`golangci-lint`](github.com/golangci/golangci-lint), use `make validate` to run it together with some other basic commit checks.
31+
2632
## Go Dependency updates
2733

2834
To automatically keep dependencies up to date we use the [renovate](https://github.com/renovatebot/renovate) bot.

0 commit comments

Comments
 (0)