I got an issue with SonarScanner where adding the compiler option “noImplicitOverride” breaks the analysis partly. SonarQube shows results for the analysis with 0 LOC and duplications although the same project version without this option does show values fitting the history.
Versions used
SonarQube Enterprise 8.9.0.43852
SonarScanner 4.5.0.2216
JavaScript/TypeScript Code Quality and Security 7.4.2.15501
Linux 5.4.0-1054-aws amd64
Java 1.8.0_292 Private Build (64-bit)
Node.js v12.22.2
Typescript 4.3.4
Potential workaround
For now removing the compiler option fixed the analysis and everything was looking as expected again, including the analysis data in SonarQube.
Welcome to the SonarSource community, and thank you for your feedback!
The compiler option noImplicitOverride is available since TypeScript 4.3, and the JavaScript/TypeScript analyzer provided by SonarQube 8.9 does not support that version unfortunately. You will need to upgrade your setup to SonarQube 9.0.
As a side note, although you are using your own version of TypeScript locally, the JavaScript/TypeScript analyzer packages its own dependency and use it. This version may change from one version of SonarQube to another, which happens to be the case here.
Currently we are relying on the LTS releases of SonarQube so without abandoning them completely there is no way to get a newer version in the coming 15 months according to the release schedule.
I would still consider this a bug as the analysis should not break completely with an unsupported version, or is the failure coming directly from the packaged compiler that you mentioned?
Would be great to have a way to get this working with newer versions and still keeping the LTS version.
can you also tell where to find a bit more information about which SonarQube version supports which exact language versions?
Information is very hard to find and as far as I can see there is nothing official looking anywhere where we can be sure that our current and future planned TS versions will be supported.
Would be great to have a way to get this working with newer versions and still keeping the LTS version.
That’s a fair point. We’ll discuss this topic among ourselves and come back to you with an answer as soon as possible.
can you also tell where to find a bit more information about which SonarQube version supports which exact language versions?
The JS/TS analyzer documentation shipped by a particular SonarQube version, e.g. 8.9 LTS, is normally the right place to find such information, but I realize now that it’s not accurate enough. We’ll make sure to be more explicit about supported TypeScript versions with future SonarQube releases.