2

While it is possible to disable duplicate code detection entirely, I am looking for disabling duplicate code detection just between modules. That is, duplicate code within a module will be detected, but if I have the same file in two different modules, that will not be detected

edit: so it is not possible to do this. Intellij modules by definition are not made to do this.

likeabbas
  • 115
  • 1
  • 10
  • Raises the question of "why have the same code in two modules", but... – Makoto Apr 18 '18 at 17:52
  • My modules are more like projects. The current project is working with 30 different microservices, a lot of which rely on each other. It's just a lot easier to to have each ms in the same project pane. I haven't found a better solution to manage multiple projects within one intellij window. I've tried the multiple project windows, but it eats my RAM and I can't have all the MS's queryable at once – likeabbas Apr 18 '18 at 18:05

3 Answers3

2

No, there is no such option. If you have code which is duplicated between multiple microservices, you can extract it into a separate module and then link this module as a jar into the microservices that use it.

yole
  • 92,896
  • 20
  • 260
  • 197
0

Just wanting to re-iterate. If you are going to make a project with intellij, you should follow the intellij guidelines that each project should be separated by different windows, and not used as different modules in each.

likeabbas
  • 115
  • 1
  • 10
  • If you have a microservice architecture with ten services, then you have ten modules in your intellij project; this should not be separated in different windows – maxeh Mar 19 '19 at 15:09
0

that problem only show in ultimate version if you can following that step you can solve that problem

Go to

**Setting->Inspections->General->Duplicated Code**

Duplicate line case