SBT在运行测试时添加checkstyle,findbugs和pmd

时间:2014-01-27 06:06:35

标签: playframework sbt checkstyle findbugs pmd

我已经找到了如何在SBT项目中添加PMD,findBugs和checkstyle,但我希望在所有版本中触发这些工具。

我怎样才能获得,例如,

sbt checkStyle

触发
sbt compile 

1 个答案:

答案 0 :(得分:1)

这是一个带有findbugs4sbt插件的build.sbt示例,确保它在编译之前运行:

import de.johoop.findbugs4sbt.FindBugs

FindBugs.findbugsSettings

compile <<= (compile in Compile).dependsOn(FindBugs.findbugs)