Sonarqube plugin: 4.4.1.3373
Sonarqube deployed as a docker container on a remote host
Trying to analyze our project using the gradle plugin using gradle sonar command
We get the following error:
> Task :sonar
Unable to parse file: file:///Users/<snip>/service/BatchCardConverterService.kt. Parse error at position 91:47
Cannot parse 'src/main/kotlin/<snip>/BatchCardConverterService.kt': Cannot convert file due to syntactic errors
The error points to the ..< operator. We can resolve the problem by replacing it with the rangeUntil call, but we would rather keep using the operator
We have tried setting the sonar.kotlin.source.version=1.9 property, but that did not change the problem
Thanks for the answer. I think the point is that the analyzer shipped in that version doesn’t support Kotlin 1.9 (As it was released at the same time when we already had a code freeze before the LTS) If you want to get the latest versions of languages faster you should consider switching to the latest releases instead of LTS or using SonarCloud. The latest SQ 10.3 and SonarCloud support Kotlin 1.9.
I’ve recently come across a similar situation and I was wondering if there is a compatibility chart somewhere that lists SonarQube version vs Language version compatibility?
So far I haven’t found it but there might be a way to find out?
Thank you!