Is it possible to disable duplicate code between intellij modules?

时间:2018-04-18 17:49:33

标签: intellij-idea

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.

2 个答案:

答案 0 :(得分:1)

不,没有这样的选择。如果您的代码在多个微服务之间重复,您可以将其解压缩到一个单独的模块中,然后将该模块作为jar链接到使用它的微服务中。

答案 1 :(得分:0)

只是想重新迭代。如果您要使用intellij创建项目,则应遵循intellij准则,即每个项目应由不同的窗口分隔,而不是在每个窗口中用作不同的模块。