The source files the Maven scanner provides to analysis are Java files. Specifically, .java files in src/main/java. If your Kotlin sources aren’t filed there, then I don’t believe setting -Dsonar.sources=src is going to help.
Alternately, you could switch to Gradle, which I suppose is the default expectation for Kotlin analysis.
but the same result. As our kotlin code is actually the teamcity pipelines code it have to be maven. I’ll try other plugins like detekt or so. Maybe it will help.
And @Rebse - maybe new version of the scanner will change something.
Moving your kotlin files to src/main/somefolder combined with -Dsonar.source=src/main may help,
it worked for our angular files.
It seems that src alone or ‘.’ is ignored by the Sonarqube Maven plugin !?
Indeed the DSL code (written in kotlin) for the teamcity pipelines should be placed into ./teamcity folder and originally I’s sure only the . is an issue with detecting the kotlin files but now I’m trying other repo, where code is “traditionally” in ./src mvn-execution.log (44.6 KB)
Files are indexed but not analyzed … The only file detected by sonar (visible on its UI in appropriate project is pom.xml)
I’ve also tried the newest maven but - hey - I’ve solved the issue. The reason was … trivial.
On the UI Administration / Configuration / Languages / Kotlin there is only one parameter to set: “File suffixes” and it’s described as:
List of suffixes for files to analyze.
I’ve read this as comma separated list … and put there value
After changing it to two separate items of the list it started working