我的公司正在从 Eclipse 转向 IntelliJ。在 Eclipse 中,我们在 checkstyle.xml
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.config.dir}/suppressions.xml"/>
</module>
<module name="SuppressionFilter">
<property name="file" value="${common.checkstyle.config.dir}/global-suppressions.xml"/>
</module>
地点:
common.checkstyle.config.dir
是通用项目(IntelliJ 中的模块)的绝对路径。checkstyle.config.dir
是项目(模块)的相对路径,其值为checkstyle.config.dir=${root.dir}/配置/checkstyle
我们想在 IntelliJ 中为这个文件定义一个路径,所以它会在每个 MODULE/config/checkstyle 目录中寻找抑制过滤器(每个模块都有不同的抑制)。
有人知道这是否可行吗?很长一段时间以来,我们一直在努力寻找解决方案,但到目前为止运气不佳。
最佳答案
感谢 Thomas Jensen 的回答,我解决了同样的问题。我在this question里面回答的很详细.希望对您有所帮助。
关于intellij-idea - Intellij checkstyle - 设置相对于模块的路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44944614/