相关疑难解决方法(0)

在 Gradle 和 Eclipse 的 Checkstyle-plugins 中使用 ${samedir}

我在 checkstyle 配置中使用SuppressionFilter 。文件的路径suppression.xml是相对于 checkstyle-configuration 给出的,使用${samedir}( http://eclipse-cs.sourceforge.net/#!/properties )。原因:我将 eclipse 配置为使用远程 checkstyle-configuration:

<module name="SuppressionFilter">
  <property name="file" value="${samedir}suppress.xml"/>
</module>
Run Code Online (Sandbox Code Playgroud)

我的 Gradle 构建脚本使用相同的 checkstyle 配置。不幸的是,gradle 的 checkstyle-plugin 似乎无法解析变量 ${samedir}。

有没有办法为 Eclipse 和 Gradle 使用相同的配置文件?我真的不想维护两个文件或在 Checkstyle 配置中使用绝对路径。

eclipse checkstyle gradle

3
推荐指数
1
解决办法
2517
查看次数

标签 统计

checkstyle ×1

eclipse ×1

gradle ×1