Javascript/CSS/HTML not automatically analyzed

  • Operating system: Windows 10
  • SonarLint plugin version: 7.1.1.54565
  • Programming language you’re coding in: Java/Javascript/HTML/CSS
  • Is connected mode used:Yes, Sonarqube v9.6.1.59531

And a thorough description of the problem / question:

In IntelliJ 2022.2.2, Sonarlint is bound to our Sonarqube instance and opening a java file in IntelliJ kicks off automatic analysis fine. However other types (Javascript, CSS, HTML) do not automatically kick off. There is a message at the bottom that says “This file is not automatically analyzed”.

image

If push the green arrow it analyzes file.

image

I didn’t see anything in the Sonarlint log tab indicating why this was not automatically analyzed. I have zero file exclusions defined and the settings have Node.JS defined and automatically trigger analysis is checked.

How can I can enable ALL file types to analyze automatically?

Hello @ctmay4,

Could you activate verbose logs and have a look in the Log view ? We should normally display the reason why the file is not analyzed

Thanks. I didn’t realize there were verbose logs. It says a “.js” file is classified as a Java resource. I never did that. Is there a way to fix it?

Trigger: EDITOR_OPEN
[Editor open] 1 file(s) submitted
File 'servers-configuration.js' excluded: file is classified as Java resource in project structure
GET 200 https://sonarqube.imsweb.com/api/system/status | response time=18ms
Downloaded server infos in 19ms
GET 200 https://sonarqube.imsweb.com/api/system/status | response time=21ms
Downloaded server infos in 21ms

One other interesting thing. I have 3 projects I am working on now.

2 are Maven builds and both will not auto-analyze with the error listed above.
1 is a Gradle build and it does auto-analyze.

Not sure if a coincidence, but I don’t manually configure the projects. I just open the pom.xml or build.gradle and it configures the IntelliJ project.