SonarLint analysis on IntelliJ hangs since adding an Angular project

Since I’ve added an Angular project to my Spring Boot project, SonarLint hangs when doing analysis. I am forced to manually kill IntelliJ and restart it, then try to avoid doing a SonarLint analysis (until I forget!).

I have tried adding a directory exclusion for the Angular project but it doesn’t appear to make any difference.

The versions of what I’m using:
IntelliJ IDEA 2020.2.2
SonarLint IntelliJ 4.11.0.20867
SonarQube Server 7.7.0.23042

Any ideas on what I can do I can use SonarLint again? I’m quite happy to not have it scan my Angular project, but I can see to prevent it.

Thanks,

Ian

Hello, thank you for your feedback.

This is rather unfortunate. In order to help you troubleshoot the issue, we would need the following additional information:

  • Which language(s) trigger such freeze - I suspect this is related to TypeScript
  • The version of the JS and/or TS analyzer on your SonarQube server
  • An extract from the SonarLint log around the time it hangs - in the SonarLint tool window, go to the “Log” tab, enable “Analysis logs” and “Verbose output” from the :gear: menu, and trigger an analysis on an Angular-related file

Thanks!

Hi, thanks for your reply. In answer to your questions:

  • There are only two languages involved - Java and TypeScript, and this is the first introduction of TypeScript into the project (it’s been Java for the past 3 years). So it’s almost certainly TypeScript.
  • The SonarJS version is 5.11, the SonarTSversion is 1.9 on the server. In IntelliJ, they are 5.1.1.7506 and 1.9.0.3766
  • I tried analysing one file. Here is the last bit of the log file:

‘JavaSquidSensor’ skipped because there is no related file in current project
‘Scala Sensor’ skipped because there is no related file in current project
‘Python Squid Sensor’ skipped because there is no related file in current project
Execute Sensor: JavaXmlSensor
Execute Sensor: HTML
‘XML Sensor’ skipped because there is no related file in current project
‘Kotlin Sensor’ skipped because there is no related file in current project
‘PHP sensor’ skipped because there is no related file in current project
‘Analyzer for “php.ini” files’ skipped because there is no related file in current project
Execute Sensor: Contextual SonarTS
Started SonarTS Analysis

I was analysing a basically empty project - the “app.component.ts” project. After that line, it simply sits there.

Thanks,

Ian

Hello, thank you for the additional info.

I don’t understand why or how the TS analyzer would hang on a small project - maybe something with your tsconfig.json?

Also, please note that the analyzer versions that are installed on your SonarQube server are more than 18 months old; if possible, I would advise that you update to a more recent version (or ask your SQ administrator to do so).

I upgraded SonarQube from 7.7 to 7.9.4. It seems to be working now. Thanks for the suggestion.

Regards,

Ian

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.