-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add goreportcard.com badge #240
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
I close PR because PR to awesome-go is closed. |
Hey @dsxack, thank you so much for trying to get Wire included on awesome-go. Really sorry to hear it didn't work out. I believe our test practices to be quite good for this project, but I'm not sure if there's anything we can do to demonstrate that in a way that awesome-go will accept. If you come up with something, I'd be happy to work with you on that. |
Something worth pointing out: the files that contain the core Wire logic hover around 85%-94% coverage: https://codecov.io/gh/google/wire/tree/master/internal/wire I think the average isn't weighted well: the main.go we intentionally don't test much because it's a thin wrapper around the well-tested library. |
@zombiezen thank you for response! Would you mind if I try to increase the coverage of core Wire logic?
Does it make sense for me to try? PR with that will be accepted? |
In general, yes, I'm supportive of PRs that increase test coverage as long as the tests don't introduce additional maintenance burden (e.g. brittle or hard-to-understand tests). Definitely would love to see more coverage for parse.go. You should be able to do that by using the existing test infrastructure and exercising more cases. copyast.go would likely need its own new unit test structure. Off the cuff, I would think the best way to do this would be something like: func TestCopyAST(t *testing.T) {
tests := []struct{
name string
source string
}{
// ...
}
for _, test := range tests {
// 1. Parse test.source using go/parser
// 2. Call copyAST
// 3. Use go-cmp to check that the returned AST is equivalent to the first
}
} |
It is one requirement of the pull request to add wire library to list https://github.com/avelino/awesome-go
avelino/awesome-go#2965
https://github.com/avelino/awesome-go/blob/master/CONTRIBUTING.md
https://github.com/avelino/awesome-go/blob/master/.github/PULL_REQUEST_TEMPLATE.md