sanposhiho / gomockhandler

Mr. gomockhandler is the clever and more agile manager of golang/mock (uber/mock) 👔
MIT License
111 stars 9 forks source link

find un-managed mocks #65

Closed riita10069 closed 3 years ago

riita10069 commented 3 years ago

This PR ensures that the check command has a one-to-one correspondence between gomockhandler.json and the actual mock generated by gomock. In other words, it finds zombie mocks. (A zombie mock is a mock generated by gomock but not managed by gomockhandler.) And It can also find mocks which are managed by gomockhandler but not generated


Fixes #61

riita10069 commented 3 years ago

61

sanposhiho commented 3 years ago

And you may already know about it, but you can check the behaviour of gomockhandler on /playground dir.

I wrote a contribution guide for that. https://github.com/sanposhiho/gomockhandler/blob/master/CONTRIBUTING.md

riita10069 commented 3 years ago

Verified that it works locally. Should we implement automated tests?

sanposhiho commented 3 years ago

Should we implement automated tests?

Of course, if have tests, it is great. :)

But, I don't write any tests so far, because of feeling めんどくさい... So if you also feel that, I say nothing about test on this PR. And I will write tests someday....

riita10069 commented 3 years ago

I empathize with you so much about めんどくさい lol. Because A virtual file system may need to be implemented for e2e testing. So I would like to think about e2e testing as the other PR.

sanposhiho commented 3 years ago

@riita10069 I changed the branch protection rule so that this PR can be merged. 🙏 Please merge it If you can.

riita10069 commented 3 years ago

Thanks for your review. I don't have repository privileges, so I can't merge. Only those with write access to this repository can merge pull requests.

sanposhiho commented 3 years ago

Only those with write access to this repository can merge pull requests.

Aha, Okay. (I forgot about an access right) I'll merge it.