How to configure minimum duplicate instances before raising a warning/error? #342
-
|
Hello again. While trying to include fallow in my current workflow, I reach one little annoying limitation. Usually, I don't spend time refactoring or reducing duplicates if the amount of duplication is small. For example, the same code duplicated just twice. A lot of times this is code which is context-sensitive, and it happens that the same variable names and the same structure are used. That is not something I want to extract into a function or something like that. I want to ignore those, but I don't want to go one by one to ignore them. I want fallow to bring my attention where there are, I don't know, for example, 30 or 40 duplicates of something that is easy or worth it to refactor. I checked all the documented available options, and it seems that none of them is for configuring something like this. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Just landed |
Beta Was this translation helpful? Give feedback.
Just landed
duplicates.minOccurrences(config) /--min-occurrences N(CLI), going out in the next release. Default stays at 2 (no change on upgrade); raise to 3+ to hide pair-only clones and focus on widespread copy-paste worth refactoring.fallow initwritesminOccurrences: 3into fresh configs. Thanks for the report!