Sbt scalacOptions and Play

Greetings Scala Users,
I wonder if anyone can suggest a solution to this interesting nugget? When using (nearly all) scalacOptions in a build.sbt, on a Play Framework project, I always see “unused imports” errors in the .scala files generated by the Play routes DSL ‘interpretor’. Is there any way of either, modifying the scalacOptions to ignore generated code, OR is there some way to fix the routes DSL so that no unused imports are added? Many thanks to anyone who might respond.

there is some discussion on this at Unused import · Issue #105 · playframework/twirl · GitHub

Thank you Seth.

We use


to suppress the unused-imports warnings for the routes (and for any generated sources).

Thank you Claudio. I will give that a try…