Skip to content

Commit ca02873

Browse files
authored
docs: Add Go Code Review Comments and allow the use of testify (#6984)
Inspired by open-telemetry/opentelemetry-go-contrib#7522 (comment) I hope it will help new contributors. Also I want to codify that we are OK when one uses `testify`, but I do not also want to force it (e.g. open-telemetry/opentelemetry-go-contrib#7522 was not using it). I think that as long as we use the standard library, `testify`, `go-cmp` we are fine (and should not accept any other libraries than those).
1 parent c4b8e91 commit ca02873

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ For a non-comprehensive but foundational overview of these best practices
233233
the [Effective Go](https://golang.org/doc/effective_go.html) documentation
234234
is an excellent starting place.
235235

236+
We also recommend following the
237+
[Go Code Review Comments](https://go.dev/wiki/CodeReviewComments)
238+
that collects common comments made during reviews of Go code.
239+
236240
As a convenience for developers building this project the `make precommit`
237241
will format, lint, validate, and in some cases fix the changes you plan to
238242
submit. This check will need to pass for your changes to be able to be
@@ -586,6 +590,10 @@ See also:
586590

587591
### Testing
588592

593+
We allow using [`testify`](https://github.com/stretchr/testify) even though
594+
it is seen as non-idiomatic according to
595+
the [Go Test Comments](https://go.dev/wiki/TestComments#assert-libraries) page.
596+
589597
The tests should never leak goroutines.
590598

591599
Use the term `ConcurrentSafe` in the test name when it aims to verify the

0 commit comments

Comments
 (0)