Typescript not recognized by SonarQube

I have several multi-language projects on my jenkins server. In all of them, Typescript code is analysed with SonarQube. But in one of them not a single Typescript file is analysed, while Javascript files are. So, SonarQube seems not to see the Typescript files at all, the “Lines of code” column of Code-View is empty for them. I looked at the configuration of the project but didn’t see any differences at all. So what could be the reason for such a strange behaviour?

SonarQube Version 6.7.3

The reason was that typescript was in the dependency-section of package.json file of the checked project. With typescript in the devDependencies-section the problem was solved. However, that is quite strange since according to SonarQube Docs it doesn’t matter in which of the two sections typescript resides.

hello @Ewgenij_Sokolovski,

you are using quite old version of SonarQube, before fixing such issues, it’s worth to try to upgrade to the latest version, as many issues might have been already fixed. We had a lot of issues related to the lookup of TS dependency, we plan to package TypeScript inside the analyzer so behavior should be more consistent. You can follow development here https://github.com/SonarSource/SonarJS/issues/2010