2014-10-29 37 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" 
相關問題