You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using sonar-scala (can't tell you the current version, sorry but I try to find out) and sbt-sonar 2.2.0 , which is using scalariform to parse the source code.
I am using plays sird syntax have some code that looks like this
case GET(p"/urlpart1/$_/urlpart2") =>
This leads to
[error] scalariform.lexer.ScalaLexerException: invalid string interpolation
[error] at scalariform.lexer.ScalaOnlyLexer$class.getStringPart(ScalaOnlyLexer.scala:253)
[error] at scalariform.lexer.ScalaLexer.getStringPart(ScalaLexer.scala:14)
[error] at scalariform.lexer.ScalaLexer.fetchStringInterpolationToken(ScalaLexer.scala:220)
[error] at scalariform.lexer.ScalaLexer.next(ScalaLexer.scala:194)
[error] at scalariform.lexer.ScalaLexer.next(ScalaLexer.scala:14)
[error] at scala.collection.Iterator$class.foreach(Iterator.scala:893)
[error] at scalariform.lexer.ScalaLexer.foreach(ScalaLexer.scala:14)
[error] at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59)
[error] at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:183)
[error] at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:45)
[error] at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310)
[error] at scalariform.lexer.ScalaLexer.to(ScalaLexer.scala:14)
[error] at scala.collection.TraversableOnce$class.toList(TraversableOnce.scala:294)
[error] at scalariform.lexer.ScalaLexer.toList(ScalaLexer.scala:14)
[error] at com.sagacify.sonar.scala.Scala$.tokenize(ScalaPlugin.scala:31)
[error] at com.sagacify.sonar.scala.ScalaSensor$$anonfun$analyse$1.apply(ScalaSensor.scala:30)
[error] at com.sagacify.sonar.scala.ScalaSensor$$anonfun$analyse$1.apply(ScalaSensor.scala:26)
[error] at scala.collection.Iterator$class.foreach(Iterator.scala:893)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
[error] at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
[error] at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error] at com.sagacify.sonar.scala.ScalaSensor.analyse(ScalaSensor.scala:26)
[error] at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
[error] at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
[error] at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
[error] at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
[error] at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
[error] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[error] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[error] at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
[error] at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
[error] at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:284)
[error] at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
[error] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[error] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[error] at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
[error] at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
[error] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
[error] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
[error] at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
[error] at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
[error] at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
[error] at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[error] at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[error] at com.sun.proxy.$Proxy669.execute(Unknown Source)
[error] at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[error] at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[error] at sbtsonar.SonarPlugin$.useEmbeddedScanner(SonarPlugin.scala:253)
[error] at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5(SonarPlugin.scala:110)
[error] at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5$adapted(SonarPlugin.scala:84)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:290)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:830)
[error] (sonarScan) scalariform.lexer.ScalaLexerException: invalid string interpolation
If I replace the underscore with anything else, the error is gone.
But even with the underscore, it is valid scala code and compiles.
The text was updated successfully, but these errors were encountered:
I am using sonar-scala (can't tell you the current version, sorry but I try to find out) and sbt-sonar 2.2.0 , which is using scalariform to parse the source code.
I am using plays sird syntax have some code that looks like this
This leads to
If I replace the underscore with anything else, the error is gone.
But even with the underscore, it is valid scala code and compiles.
The text was updated successfully, but these errors were encountered: