2014-10-29 41 views
4

我在播放项目中使用了WartRemover。我想从Wartremover扫描中排除路由文件(从它生成的代码)。我添加了以下内容,但它仍然会扫描routes生成的代码。排除播放路径文件 - 从WartRemover生成的代码

wartremoverExcluded ++= Seq("com.xxx.controllers.ReverseMyController","com.xxx.controllers.javascript.ReverseMyController","com.xxx.controllers.ref.ReverseMyController") 

而且它仍然显示从生成的代码为routes播放文件的疣错误。例如,

warn] /xxx/conf/routes:23: Inferred type containing Nothing 
warn] PUT /service/myendpoint  com.xxx.controllers.MyController.postMyData 

,并同样在路由文件中定义较多的路由。

如何从wartremover扫描中排除路线?

+0

不知道这是否会帮助很多,但同时我注意到,'Wart.Nothing'似乎失败甚至当它被排除在外,其他如'Wart.Any','疣路由文件。 Product'和'Wart.Serializable'似乎表现正确。 – 2014-11-20 21:34:32

回答

0

您是否尝试过将-Xprint:typer放入scalacOptions以查看哪个包是问题所在。这似乎为我工作,当我忽略以下

wartremoverExcluded ++= Seq("Routes", "controllers.ref") 
0

它看起来像这个问题被问在wartremover 0.11的范围内,但如果有人发现自己在这里寻找一个0.12的解决方案,这对我的作品:

wartremoverExcluded += sourceManaged.value/"main"/"routes_reverseRouting.scala" 
wartremoverExcluded += sourceManaged.value/"main"/"routes_routing.scala" 
相关问题