Closed
Description
I've been fiddling with the mass settings on the duplication engine, and it's pretty good, but I find that often I have legitimate reasons for writing code twice; namely, it would be needlessly obfuscating code to refactor a given pair of functions.
Is there a way to configure the "count threshold"? Currently this seems to be hard coded at 2: if code happens twice, it is reported. I'd like to be able to configure something like this:
duplication:
enabled: true
config:
languages:
ruby:
mass_threshold: 10
count_threshold: 3
This would emulate the "rule of three" in Ruby while being extra-strict about code mass.
If this is interesting to the core team, I could potentially even write a pull request.
Metadata
Metadata
Assignees
Labels
No labels