Is it possible to disable duplicate code detection in Intellij?

后端 未结 5 2058
傲寒
傲寒 2020-12-07 11:18

Is it possible to disable duplicate code detection in Intellij?

I haven\'t found this feature to be useful and it continues to distract me.

5条回答
  •  旧巷少年郎
    2020-12-07 12:05

    Yes, it's possible, but I would strongly advise against it!

    Duplicate code is a form of technical debt. Any duplicated code that contains a bug means you now have a duplicated bug - you then run the risk that when you fix it, you'll only fix it in one place and the duplicate will remain...

    If duplicate code warnings are distracting you, then the best strategy for getting rid of them is to remove the code duplication... Your codebase and future maintainers will thank you for it

提交回复
热议问题