You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-08-10 22:31:50 +02:00
docs: Add Go Code Review Comments and allow the use of testify (#6984)
Inspired by https://github.com/open-telemetry/opentelemetry-go-contrib/pull/7522#discussion_r2190580677 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. https://github.com/open-telemetry/opentelemetry-go-contrib/pull/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).
This commit is contained in:
@@ -233,6 +233,10 @@ For a non-comprehensive but foundational overview of these best practices
|
||||
the [Effective Go](https://golang.org/doc/effective_go.html) documentation
|
||||
is an excellent starting place.
|
||||
|
||||
We also recommend following the
|
||||
[Go Code Review Comments](https://go.dev/wiki/CodeReviewComments)
|
||||
that collects common comments made during reviews of Go code.
|
||||
|
||||
As a convenience for developers building this project the `make precommit`
|
||||
will format, lint, validate, and in some cases fix the changes you plan to
|
||||
submit. This check will need to pass for your changes to be able to be
|
||||
@@ -586,6 +590,10 @@ See also:
|
||||
|
||||
### Testing
|
||||
|
||||
We allow using [`testify`](https://github.com/stretchr/testify) even though
|
||||
it is seen as non-idiomatic according to
|
||||
the [Go Test Comments](https://go.dev/wiki/TestComments#assert-libraries) page.
|
||||
|
||||
The tests should never leak goroutines.
|
||||
|
||||
Use the term `ConcurrentSafe` in the test name when it aims to verify the
|
||||
|
Reference in New Issue
Block a user