Jaime
(Jaime Holland)
March 8, 2022, 3:32pm
1
versions used (SonarQube 9.2.3.50713, Scanner sonarsource/sonar-scanner-cli:4.7)
error observed
Underscores in numeric literals is not supported. For example this file:
package com.zego.mapmatching
object test {
val somevalue: Int = 10_000
}
line 4 is reported as a Code Smell (parsing error) because of the underscore although it is valid syntax
potential workaround
Remove the underscore?
Colin
(Colin)
March 9, 2022, 9:27am
4
Hey there.
This was fixed in SonarQube v9.3 with an update to the underlying Scala parser (SONARSLANG-541 ). I just tested your reproducer locally and it scanned without any parsing errors!
2 Likes
system
(system)
Closed
March 16, 2022, 9:28am
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.