uber / piranha

A tool for refactoring code related to feature flag APIs
Apache License 2.0
2.29k stars 197 forks source link

remove experiment name enum class from tests #66

Closed swayamraina closed 2 years ago

swayamraina commented 4 years ago

I see a pending task of removing enum TestExperimentName from tests This is also marked as todo in code as // Ideally we would remove this too, fix later This acts as a boilerplate when adding new test cases and should be removed.

This can be fixed by simply creating a class similar to XPTest under test resources and creating handler function like assertFeatureFlags (String flags...) This new function will create the output enum file with provided input flags.

mkr-plse commented 4 years ago

This is not a problem with tests alone. If the set of flags are removed and the enum becomes empty, Piranha should delete the entire file.

swayamraina commented 4 years ago

i guess then this should be marked as a duplicate or dependent on https://github.com/uber/piranha/issues/58

ketkarameya commented 2 years ago

@mkr-plse @swayamraina I am closing this issue. With polyglot piranha we can now delete empty enums, and files with empty enums/classes. Please feel free to reopen, if you have any questions.