Skip to content
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

Feature Request: different duplication mass_threshold by code path #143

Open
radovsky opened this issue Oct 20, 2016 · 6 comments
Open

Feature Request: different duplication mass_threshold by code path #143

radovsky opened this issue Oct 20, 2016 · 6 comments

Comments

@radovsky
Copy link

radovsky commented Oct 20, 2016

I have a lot of pages in my app (in a specific directory) that are using a DSL which requires some duplication. I'd like to be able to set a higher threshold for similar/identical code for files in this directory, without raising the threshold for the rest of the codebase.

Thanks!

@dblandin
Copy link
Contributor

dblandin commented Nov 5, 2016

Sounds like a nice feature to me! Not sure when we would have the opportunity to implement this internally but I'll add a couple GH labels to encourage a community contribution.

Thanks!

@jars
Copy link

jars commented Jan 18, 2017

+1 We could really benefit from this!

@zenspider
Copy link
Contributor

zenspider commented Feb 3, 2017

I'm currently thinking about adding the ability to have a different mass threshold per node type (iter, call, lasgn, etc)... not by path. Would that address what you want, or do you think path is actually important in this case?

ETA: PS, iter is a call w/ a block, so what most "DSL"s would be using.

@radovsky
Copy link
Author

radovsky commented Feb 5, 2017

@zenspider it seems like code path might actually matter for the use case I had in mind, at least if your solution would not discriminate between different types of iteration loops within a node type. Since writing the original post, I left the organization which owns all the aforementioned code, so at the moment it's difficult for me to check. cc @blimmer

@zenspider
Copy link
Contributor

I've gone about this completely differently by adding pattern matching and filtering. See #190 for my proposed solution to this.

@sagotsky
Copy link

sagotsky commented Apr 2, 2018

+1. My use case is for tests. I don't expect tests to be DRY. I want them to be dumb and simple. It would be really nice to have a different similarity threshold for test/ than the rest of the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants