SonarQube analysis fail to parse Scala 3.3 files with "fewer braces" syntax

Hi Team,

We use SonarQube Community and have the latest LTS installed (9.9.2)

On our Scala repositories, every files that uses the “fewer braces” syntax (SIP-44 - Fewer Braces | Scala Documentation) introduced first in Scala 3.3 (Release 3.3.0 · lampepfl/dotty · GitHub)
Fail with a parsing error:
**09:37:34** ERROR: Unable to parse file: file:///opt/app/jenkins/workspace/BOSS_boss-settlement_master/service/src/main/scala/com/boss/settlement/util/gtframe/GtfRounder.scala. Parse error at position 13:39 **09:37:34** ERROR: Cannot parse 'service/src/main/scala/com/boss/settlement/util/gtframe/GtfRounder.scala': Unable to parse file content.

Albeit line 13 being highlighted we are 99% sure it’s L21 causing the issue;
As we have many other files with the Scala3 class syntax that get parsed correct and all the failing ones have one or more occurences of the “fewer braces” syntax

We’ve also tried locally the 10.2.1 release of Sonarqube but that one also doesn’t see to support this new syntax opened.

Is there a version of Sonarqube that supports fully the Scala 3.3 syntax? If not is it possible to add this support in the next version?

Thank you for maintaining Sonarqube,

  • Tristan

Hey there.

I expect this support will come with SonarQube v10.3 ([SONARSLANG-622] - Jira)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.