- 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. You can convert to non-shallow with 'git fetch --unshallow'.
Missing blame information for the following files:
* libs/archive/src/main/java/com/parsons/centralserver/archive/controller/ArchiveController.java
* core/browser-client/src/app/interceptors/etag.interceptor.spec.ts
... [many many more ts and java files]
I do not need the blame info, so I’m not put off by that.
Here is my top level sonar block config:
apply plugin: 'org.sonarqube'
sonar {
properties {
property "sonar.projectKey", "[key]"
property "sonar.qualitygate.wait", true
property "sonar.sources", "src/main"
property "sonar.tests", "src/test"
property "sonar.verbose", true
property "sonar.log.level", "DEBUG"
}
}
And here is my subproject sonar block config that contains the web app:
sonar {
properties {
property "sonar.language", "ts"
property "sonar.sources", "src/app,src/modules" // override/customize sources
}
}