-
Notifications
You must be signed in to change notification settings - Fork 92
Fix unused imports #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unused imports #143
Conversation
More warnings by default linter starting in Scala 2.12.2
I'm not so sure this was ready to go, we'll see though. |
@@ -105,7 +104,7 @@ object Utility extends AnyRef with parsing.TokenTests { | |||
val escMap = pairs map { case (s, c) => c -> ("&%s;" format s) } | |||
val unescMap = pairs ++ Map("apos" -> '\'') | |||
} | |||
import Escapes.{ escMap, unescMap } | |||
import Escapes.unescMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the claim that escMap
was unused was a bit apocryphal on the compiler's part.
Can the compiler determine if an import is unused by other source files as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I'm wrong. The implementation really didn't use escMap
. It's that #102 wanted to start using it again, and couldn't find it. We're good here!
I was mistaken, the compiler was right. My faith is restored. I never should have doubted the gods. |
Sorry I rushed this one :-) It looked good to me. The reason I wanted to get it in is that the latest version of the sbt-scala-modules plugin actually enables |
No worries at all. In the future I'll try to remember to mark it WIP. I'm on board for both linting and for reducing warnings, so whatever it takes I'm for it. :) |
More warnings are enabled by default linter starting in Scala 2.12.2
See scala/scala#5402