Contributions are welcome + appreciated.
These are a couple contributions I would especially appreciate:
If one does not exist already, open a bug report or feature request in https://github.com/jjti/go-spancheck/issues.
Test cases are in /testdata
.
If fixing a bug, you can add it to testdata/enableall/enable_all.go
(for example):
func _() {
ctx, span := otel.Tracer("foo").Start(context.Background(), "bar") // want "span.End is not called on all paths, possible memory leak"
print(ctx.Done(), span.IsRecording())
} // want "return can be reached without calling span.End"
If adding a new feature with a new combination of flags, create a new module within testdata
:
- Create a new module, eg
testdata/setattributes
- Copy/paste go.mod/sum into the new module directory and update the module definition, eg
module github.com/jjti/go-spancheck/testdata/setattributes
- Add the module to the workspace in go.work
- Add the module's directory to the
testvendor
Make target in Makefile
make test
Eg of a GitHub snippet for PRs:
alias gpr='gh pr view --web 2>/dev/null || gh pr create --web --fill'
gpr