File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
sonar-kotlin-plugin/src/main/java/org/sonarsource/kotlin/plugin Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import org.sonar.api.issue.NoSonarFilter
31
31
import org.sonar.api.measures.FileLinesContextFactory
32
32
import org.sonarsource.analyzer.commons.ProgressReport
33
33
import org.sonarsource.kotlin.api.checks.hasCacheEnabled
34
+ import org.sonarsource.kotlin.api.common.KOTLIN_LANGUAGE_VERSION
34
35
import org.sonarsource.kotlin.api.common.KotlinLanguage
35
36
import org.sonarsource.kotlin.api.common.measureDuration
36
37
import org.sonarsource.kotlin.api.frontend.bindingContext
@@ -67,6 +68,13 @@ class KotlinSensor(
67
68
.name(language.name + " Sensor" )
68
69
}
69
70
71
+ override fun execute (sensorContext : SensorContext ) {
72
+ sensorContext.config()[KOTLIN_LANGUAGE_VERSION ].ifPresent { value ->
73
+ sensorContext.addTelemetryProperty(" kotlin.languageVersion" , value)
74
+ }
75
+ super .execute(sensorContext)
76
+ }
77
+
70
78
override fun getExecuteContext (
71
79
sensorContext : SensorContext ,
72
80
filesToAnalyze : Iterable <InputFile >,
You can’t perform that action at this time.
0 commit comments