Doesn’t play well with `-Ywarn-unused-import`.
See original GitHub issueWe use -Ywarn-unused-import
(and -Xfatal-warnings
), and get
Unused import
import acyclic.file
on any file I add it to.
I don’t know of any way to silence an unused import warning (e.g., using @SuppressWarnings
), but I’d happily do that if possible.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
scala - -Ywarn-unused-import triggering on play routes file
I just encountered the same problem with Scala 2.12 and Play 2.6 (which you're probably now using). A Scala compiler plugin called Silencer ......
Read more >Can't use Scala 2.11 -Ywarn-unused-import because it trips ...
I'm trying to use the Scala 2.11 -Ywarn-unused-import option while compiling, but not in the console, where it effectively disables the ability ...
Read more >RemoveUnused · Scalafix - Scala Center
Removes unused imports and terms that reported by the compiler under -Ywarn-unused.
Read more >scalacenter/scalafix - Gitter
well, I'm working on some scalafix rule. it assumes replacing one deprecated ... -r RemoveUnused -f myproject/ --scalac-options "-Ywarn-unused-import, ...
Read more >4.8. Warnings and sanity-checking - downloads for Haskell.org
Causes a warning to be emitted when a pragma that GHC doesn't recognise is used. As well ... Have the compiler warn if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One solution would be to make the acyclic plugin remove that import when it sees it. If anyone wants to send a PR doing so, I’ll gladly merge it
@sellout maybe this plugin can help? https://github.com/ghik/silencer (disclaimer: haven’t used it myself)