- Sonar scanner for gradle: org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.5.0.2730
- Running in gitlab and reporting to SonarQube Enterprise Edition Version 9.9.1 (build 69595)
I’m trying to run a multi-module scan of a java and angular/typescript application. After much trial and error I finally have scan results for the code locations desired, however, the problem I run into is part of the typescript scan. ts files are recognized but do not show any scan results in my sonarqube project.The gitlab log shows the following:
Shallow clone detected, no blame information will be provided
....
I do not need the blame info, so I’m not put off by that.
I’m having a difficult time finding documentation about how to add typescript scanning when using the gradle plugin. For instance, what should the language setting be?
property “sonar.language”, “typescript”
or
property “sonar.language”, “ts”
or
property “sonar.language”, “js”
I have called the sonar scanner command separately and DID get back typescript scan results, so this appears to be something with the way the gradle plugin inserts settings automagically.
The top level sonar block is defined as:
sonar {
properties {
property "sonar.projectName", "Valid Name"
property "sonar.qualitygate.wait", true
property "sonar.sources", "src/main"
property "sonar.tests", "src/test"
property "sonar.verbose", true
property "sonar.log.level", "DEBUG"
}
}
The angular app has the following definition:
sonar {
properties {
property "sonar.language", "ts" // have tried ts,js, javascript also
property "sonar.sources", "src/app,src/modules"
}
}