I try to add Wartremover to my Play project, but it continues to report warts in the routes file, even if I exclude it. I am using Wartremover 0.14 and Play Framework 2.4.6.
Relevant part from my build.sbt file:
wartremoverErrors ++= Warts.all
wartremoverExcluded += crossTarget.value / "routes" / "main" / "router" / "Routes.scala"
(Please note that I have to do this differently than to offer answers to this question ).
Without a line, wartremoverExcludedWartremover reports 13 errors in the routes file. However, he still reports two: one about Wart.Varand one about Wart.ExplicitImplicitTypes. I can also exclude these warts, but using Warts.allBut(Wart.Var, Wart.ExplicitImplicitTypes), but I would prefer not to, because it excludes these warts from my entire code base, and not just the routes file.
Is there a way to make Wartremover stop reporting these warts in the route file without excluding these warts for each file?
source
share