scala/scala-abide

Unnecessary string interpolator

paddymahoney opened this issue · 2 comments

Would detect strings using the interpolator syntax that didn't $ splice any identifier values:

object StringInterpolator {
  val flagged = s"no.identifier.spliced"
  val notFlagged = s"$flagged.is.spliced"
}

s ought to be a macro like f that emits a string literal. In general, you don't know that the interpolator is unnecessary. For instance, f"%n" is not a constant.

Abide is superseded by https://github.com/scalacenter/scalafix; closing all issues