Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Parsing sources with trailing commas (supported since Scala 2.12.2+) #276
Scala 2.12.2+ added support for trailing commas. However scalastyle currently doesn't parse source files correctly when trailing commas are used. An error similarly to "Expected identifier, but got Token(RPAREN,),xxx,))" is thrown.
As a very simple example:
referenced this issue
Nov 8, 2017
I've commented on a Scalariform PR to push for making incremental progress here: if Scalaiform can get to a point where the parser doesn't crash, even if preservation of trailing commas doesn't work during automated reformatting, then that unblocks a fix here in Scalastyle (solving the problem for folks who use only Scalastyle and not Scalariform) and solves a huge usability issue (confusing error messages). See scala-ide/scalariform#262 (comment)