I'm using varargs like below in my code base.
def acceptVarargs[S](s: S*): Unit = {}
def toVarArgs[T](s: Seq[T]) = acceptVarargs(s: _*)
I'm using autofix plugin in my sbt project.
I'm following the steps here to run the scalafix command.
When I run the command sbt> scalafixAll dependency:[email protected]:autofix:3.0.8-1
I get below Error.
[error] /Users/rajkumar.natarajan/Documents/Coding/misc/varargs-scalafix-error/src/main/scala/Utils.scala:3: error: repeated argument not allowed here [error] def toVarArgs[T](s: Seq[T]) = acceptVarargs(s: _*) [error] ^ [error] at scala.meta.internal.parsers.Reporter.syntaxError(Reporter.scala:16) [error] at scala.meta.internal.parsers.Reporter.syntaxError$(Reporter.scala:16) [error] at scala.meta.internal.parsers.Reporter$$anon$1.syntaxError(Reporter.scala:22) [error] at scala.meta.internal.parsers.Reporter.syntaxError(Reporter.scala:17) [error] at scala.meta.internal.parsers.Reporter.syntaxError$(Reporter.scala:17)
The complete error stack trace is here
What is wrong in my codebase with varargs? How can I fix this error?
The project in github here
Other details -
sbt version - 1.5.2 scala version - 2.12.10 java version - 11.0.10-zulu