一個CheckStyle的SuppressionFilter我想用相同的CheckStyle配置在SBT(https://github.com/etsy/sbt-checkstyle-plugin)和日食(http://eclipse-cs.sf.net/)如何定義在Eclipse和SBT
這從SuppressionFilter 我的作品除了可以定義文件要麼使其作品在eclipse:
<module name="SuppressionFilter">
<property name="file" value="${samedir}/checkstyleExcludeFiles.xml"/>
</module>
然後SBT抱怨
org.xml.sax.SAXException: Property ${samedir} has not been set
或者使其作品在SBT:
<module name="SuppressionFilter">
<property name="file" value="checkstyleExcludeFiles.xml"/>
</module>
然後日食與
cannot initialize module SuppressionFilter - Cannot set property 'file' to 'checkstyleExcludeFiles.xml' in module SuppressionFilter
抱怨我發現螞蟻此解決方案: How to define suppressions-definitions for checkstyle, that work with both ant and eclipse
但我新來的sbt,並不知道我defi如何在build.sbt中以這種方式創建一個變量,它將被checkstyle插件拾取。
我該怎麼辦?我想在eclipse中儘可能少地配置,因爲這將在每臺開發人員機器上完成。
感謝
現在我有兩個checkstyle配置,一個用於sbt和一個用於eclipse。由於checkstyle配置很少改變,這並不是非常糟糕。只是不好.. – tim