dmarkham / enumer

A Go tool to auto generate methods for your enums
Other
410 stars 66 forks source link

Use of enumer hurts code coverage metrics #66

Open muir opened 1 year ago

muir commented 1 year ago

In my project, I wrote a test to fully cover enumer-generated code. I would be happy/willing to take that test and add a flag to enumer so that enumer will generate tests too.

Let me know.

See https://github.com/muir/xop-go/blob/main/internal/enumer_test.go

dmarkham commented 9 months ago

I appreciate the initiative to enhance enumer with test generation, and I see where you're coming from. However, I believe that the robustness of our tests comes from using the types as they are intended in real scenarios, rather than generating tests for the sake of coverage metrics. That being said, I'm not opposed to new ideas. If you've got a pull request, I'd be willing to review it and discuss the potential benefits it could bring to our project.