SonarLint Intellij Plugin not analyzing TypeScript since version 4.3

Hello,

  • SonarCloud
  • SonarLint Intellij 4.3.0.3495
  • WebStorm 2019.2 & 2019.3
  • SonarJS 5.2.1.7778

since the update to SonarLint Plugin for Intellij version 4.3 I run into issues regarding analysis of typescript files. The Plugin is set up in connected mode with SonarCloud.

Our setup did not change since the last time the analysis worked locally. Since the update we see “TypeScript sensor excluded” in the log files and TypeScript files are not analyzed anymore. HTML on the other side is working fine.

EDIT: The following is only true if NOT set to connected mode. In connected mode the new version of the plugin is loaded so it must be a different issue.

I narrowed it down to an old version of SonarJS being bundled into the SonarLint plugin which is not capable of TypeScript analysis while on the other side SonarTS was excluded.

If one manually replaces the plugin in the plugin directory (Webstorm…\config\sonarlint\plugins) with the newest available Version of SonarJS (while keeping the name of the old plugin jar file) the analysis is executed again.

Is there any way to do force use of the newest version by a setting? Or this an error in the SonarLint plugin?

Thank you for your help in advance.

Regards,
Stefan

Hi @ssedlmaier

We are not supposed to have TypeScript analysis enabled in IntelliJ based IDEs (see https://jira.sonarsource.com/browse/SLI-263). The fact that it was unlocked was indeed a temporary “hole” caused by recent SonarJS/SonarTS refactoring. This was not reliable, because SonarJS was trying to locate typescript compiler location himself, depending on the first file being analyzed in the IDE.
In the SonarLint context, we want to query the IDE to provide the correct typescript compiler location (see details in the ticket).

In SonarLint 4.3 we fixed the “hole”: https://jira.sonarsource.com/browse/SLCORE-259

We would like to officially enable TypeScript support in IntelliJ, so stay tuned, and sorry for the disappointment.

Heads up: version 4.6 is now available, with support for TypeScript analysis :tada:

Perfect! Thanks for the information.
We will start using it next week!

1 Like