feature: allowed repetitions#10
Conversation
|
Thanks, I like the direction — I can see this being useful for teams that only want to act once duplication appears in several places. One naming concern before this grows CLI/docs support: Would you be open to renaming this to That would make the interaction clearer:
With that naming, the default should be I’d also like the final version to include config type/validation, Mix task flag support, and README docs that clarify |
|
I also didn't like I'm working to finalize this |
|
I believe it's done |
|
Thanks @neerfri — merged! |
@dannote Thanks for merging the previous PR so quickly and releasing the version.
In the spirit of quick iteration this PR adds a feature that I wanted to see what you think of before I complete the implementation with proper mix task args and config file support.
Summary
It's often advised to wait with extracting repeating code until the 3rd or 4th time you repeat it. Otherwise you may be drying too early and not giving the code in each call site time to mature.
This feature adds a config flag
allowed_repetitionsthat will filter clones that don't have at least that many fragments.Open Tasks