ERROR sonarlint - No file to analyze

Windows 11 Enterprise 23H2
IntelliJ IDEA 2024.3.2.2 (Ultimate Edition)
SonarQube for IDEA 10.17.0.80539
SonarQube Server Community Edition v10.5.1 (90531)

I have a Gradle based IntelliJ project, stored in GitHub, with a mix of Java and Typescript code. CI/CD analysis is being performed successfully by SonarQube server, but SonarQube for IDE in IntelliJ will not analyze files locally.

Action: open a Java or Typescript file in IntelliJ with automatic analysis enabled, or select the Current File tab and run “Analyze current file” on a Java or Typescript file.

Expected result: The file is analyzed.

Actual result: The file is not analyzed. The Current File tab in SonarQube for IDE shows No analysis done on the current opened file, and an ERROR sonarlint - No file to analyze error is logged.

This happens regardless of whether or not SonarQube for IDE is connected / bound to the SonarQube server. On the SonarQube server, clicking “Open in IDE” successfully creates and configures a connection with a new auth token, opens the file in IntelliJ, and the expected active rules are logged, but analysis fails as described.

Verbose/analysis logs for the unconnected case follow. With the project connected to SonarQube, the logs are a superset of these, with active rules listed. Both cases end with the same ERROR sonarlint - No file to analyze

Trigger: CURRENT_FILE_ACTION
[CURRENT_FILE_ACTION] 1 file(s) submitted
Configuring analysis with org.sonarlint.intellij.java.JavaAnalysisConfigurator
Cancelling analysis e39551cb-9712-4a5f-8df3-cb5c5e54317c
Cancelling analysis 63ce4c72-32ff-438a-9d2d-70c14bd8f3c4
Analysing 'UuidRepresentation.java' (ID 506100d4-a39b-464d-a392-21fb9b52ef3a)...
 [2025-02-18T14:13:36.302] [SonarLint Server RPC request executor] DEBUG sonarlint - Filtered out URIs ignored by Git: file:///C:/xxx/src/main/java/xxx/UuidRepresentation.java
 [2025-02-18T14:13:36.304] [SonarLint Server RPC request executor] INFO sonarlint - Triggering analysis with configuration: [
  baseDir: C:\git\main\viya-esp-studio-app
  extraProperties: {sonar.java.target=17, sonar.java.libraries=C:\Program Files\Eclipse Adoptium\jdk-17.0.10.7-hotspot\lib\jrt-fs.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.16.1\47bd4d333fba53406f6c6c51884ddbca435c8862\commons-codec-1.16.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.hibernate.orm\hibernate-core\6.5.3.Final\1e23c320a5d10f5eaecbd23095fca5c5c83c1fb5\hibernate-core-6.5.3.Final.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.persistence\jakarta.persistence-api\3.1.0\66901fa1c373c6aff65c13791cc11da72060a8d6\jakarta.persistence-api-3.1.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\2.0.1\51a520e3fae406abb84e2e1148e6746ce3f80a1a\jakarta.transaction-api-2.0.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.servlet\jakarta.servlet-api\6.0.0\abecc699286e65035ebba9844c03931357a6a963\jakarta.servlet-api-6.0.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.14.0\1ed471194b02f2c6cb734a0cd6f6f107c673afae\commons-lang3-3.14.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.23.1\425ad1eb8a39904d2830e907a324e956fb456520\log4j-to-slf4j-2.23.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.client5\httpclient5\5.3.1\56b53c8f4bcdaada801d311cf2ff8a24d6d96883\httpclient5-5.3.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\3.3.7\d855814505338e7881edc54c26dbaf2715c8ee7c\spring-data-jpa-3.3.7.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\6.1.16\e3a9185be7af644cde2e446787747a4f93ec8ad9\spring-web-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.xmlunit\xmlunit-core\2.10.0\1355088731b4ec2107ff7f319f0d7445d916bab\xmlunit-core-2.10.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.validation\jakarta.validation-api\3.0.2\92b6631659ba35ca09e44874d3eb936edfeee532\jakarta.validation-api-3.0.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.xml.bind\jakarta.xml.bind-api\4.0.2\6cd5a999b834b63238005b7144136379dc36cad2\jakarta.xml.bind-api-4.0.2.jar,,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.23.1\9c15c29c526d9c6783049c0a77722693c66706e1\log4j-api-2.23.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.16\172931663a09a1fa515567af5fbef00897d3c04\slf4j-api-2.0.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.core5\httpcore5-h2\5.2.5\9425df4d1365cee86a8e031a036bdca4343da4b\httpcore5-h2-5.2.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.core5\httpcore5\5.2.5\dab1e18842971a45ca8942491ce005ab86a028d7\httpcore5-5.2.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\3.3.7\6c380b648c302d67b5eb5a79de867909f7bbd7eb\spring-data-commons-3.3.7.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\6.1.16\bf93caa9dbc2247c0cbd3c13e2b7f3a0dfe15229\spring-orm-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\6.1.16\2cf6295ab7d9713902bfd8c123060f3632c19bbe\spring-context-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\6.1.16\c2203c1b61446c3f2a24bcfee596bdb57e0bcf8a\spring-aop-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\6.1.16\b74ae426fc0a36a41dfec593a54ce516705359a0\spring-tx-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\6.1.16\531d54d94b66362600ab3ecc081e716249b82c32\spring-beans-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\6.1.16\a4d36937b844a1f4bb493f8f18f4313d53bc85b1\spring-core-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-runtime\4.13.0\5a02e48521624faaf5ff4d99afc88b01686af655\antlr4-runtime-4.13.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\2.1.1\48b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation\1.13.9\c52e215e206d6a72fa481809a894efd20cb793fb\micrometer-observation-1.13.9.jar,,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.17.3\42c617beb411ee813bdc39a287424bfb19d99185\jackson-databind-2.17.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.17.3\4f30a05d2eee0ab700cdc27aa5967e934d3042b2\jackson-annotations-2.17.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.activation\jakarta.activation-api\2.1.3\fa165bd70cda600368eee31555222776a46b881f\jakarta.activation-api-2.1.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\6.1.16\558dd018e6a489cd85909e7f42136afe38eb4939\spring-jdbc-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\6.1.16\153594fd2dbfcd5e23913a7397736567e319794c\spring-expression-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\6.1.16\b5f2a825b4cab4868fd34bcf30b5cd566954e744\spring-jcl-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons\1.13.9\e13aab8d19d87c6b1ec7e983fc70c1579f5e7ba\micrometer-commons-1.13.9.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.17.3\1d6eb3e959c737692b720d3492b2f1f34c4c8579\jackson-core-2.17.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\4.0.5\ca84c2a7169b5293e232b9d00d1e4e36d4c3914a\jaxb-runtime-4.0.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.5.3.Final\c88fc1d8a96d4c3491f55d4317458ccad53ca663\jboss-logging-3.5.3.Final.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\6.0.6.Final\77a5f94b56d49508e0ee334751db5b78e5ccd50c\hibernate-commons-annotations-6.0.6.Final.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\io.smallrye\jandex\3.1.2\a6c1c89925c7df06242b03dddb353116ceb9584c\jandex-3.1.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.7.0\e98374da1f2143ac8e6e0a95036994bb19137a3\classmate-1.7.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.14.19\4c0c637b8f47dc08f89240e6f59900011752c97b\byte-buddy-1.14.19.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.inject\jakarta.inject-api\2.0.1\4c28afe1991a941d7702fe1362c365f0a8641d1e\jakarta.inject-api-2.0.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.5.14\80d5d60fc4fc099c4e34f8a7268f5eea10030bfd\logback-classic-1.5.14.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.ibm.icu\icu4j\70.1\dfa3a1fbc55bf5db8c6e79fc0935ac7ab1202950\icu4j-70.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-core\4.0.5\7b4b11ea5542eea4ad55e1080b23be436795b3\jaxb-core-4.0.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\json-patch\1.13\c8b72249e50fe778e7df223e5b1fed1931a4a688\json-patch-1.13.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.5.14\e9e86929cf82e2009303e748c1caf131cb51c2c1\logback-core-1.5.14.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.eclipse.angus\angus-activation\2.0.2\41f1e0ddd157c856926ed149ab837d110955a9fc\angus-activation-2.0.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\4.0.5\f36a4ef12120a9bb06d766d6a0e54b144fd7ed98\txw2-4.0.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\4.1.2\18ec117c85f3ba0ac65409136afa8e42bc74e739\istack-commons-runtime-4.1.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\jackson-coreutils\2.0\6374371261b91b829d10f21256b2feefdf8f0a78\jackson-coreutils-2.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\msg-simple\1.2\a06afa2d5d75c98e54ab370107930978fc3f9937\msg-simple-1.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\btf\1.3\6cf5405e214cbc83337a107cdef8401fb6aa6383\btf-1.3.jar, sonar.js.internal.bundlePath=C:\Users\xxxx\AppData\Roaming\JetBrains\IntelliJIdea2024.3\plugins\sonarlint-intellij\plugins\eslint-bridge, sonar.java.enablePreview=false, sonar.java.source=17, sonar.java.binaries=C:\git\main\viya-esp-commons-lib\server-commons\representations\build\classes\java\main, sonar.java.jdkHome=C:/Program Files/Eclipse Adoptium/jdk-17.0.10.7-hotspot, sonar.java.test.libraries=C:\git\main\viya-esp-commons-lib\server-commons\representations\build\classes\java\main,C:\Program Files\Eclipse Adoptium\jdk-17.0.10.7-hotspot\lib\jrt-fs.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.16.1\47bd4d333fba53406f6c6c51884ddbca435c8862\commons-codec-1.16.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.hibernate.orm\hibernate-core\6.5.3.Final\1e23c320a5d10f5eaecbd23095fca5c5c83c1fb5\hibernate-core-6.5.3.Final.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.persistence\jakarta.persistence-api\3.1.0\66901fa1c373c6aff65c13791cc11da72060a8d6\jakarta.persistence-api-3.1.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\2.0.1\51a520e3fae406abb84e2e1148e6746ce3f80a1a\jakarta.transaction-api-2.0.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.servlet\jakarta.servlet-api\6.0.0\abecc699286e65035ebba9844c03931357a6a963\jakarta.servlet-api-6.0.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.14.0\1ed471194b02f2c6cb734a0cd6f6f107c673afae\commons-lang3-3.14.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.23.1\425ad1eb8a39904d2830e907a324e956fb456520\log4j-to-slf4j-2.23.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.client5\httpclient5\5.3.1\56b53c8f4bcdaada801d311cf2ff8a24d6d96883\httpclient5-5.3.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\3.3.7\d855814505338e7881edc54c26dbaf2715c8ee7c\spring-data-jpa-3.3.7.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\6.1.16\e3a9185be7af644cde2e446787747a4f93ec8ad9\spring-web-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.xmlunit\xmlunit-core\2.10.0\1355088731b4ec2107ff7f319f0d7445d916bab\xmlunit-core-2.10.0.jar,,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.validation\jakarta.validation-api\3.0.2\92b6631659ba35ca09e44874d3eb936edfeee532\jakarta.validation-api-3.0.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.xml.bind\jakarta.xml.bind-api\4.0.2\6cd5a999b834b63238005b7144136379dc36cad2\jakarta.xml.bind-api-4.0.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.23.1\9c15c29c526d9c6783049c0a77722693c66706e1\log4j-api-2.23.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.16\172931663a09a1fa515567af5fbef00897d3c04\slf4j-api-2.0.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.core5\httpcore5-h2\5.2.5\9425df4d1365cee86a8e031a036bdca4343da4b\httpcore5-h2-5.2.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents.core5\httpcore5\5.2.5\dab1e18842971a45ca8942491ce005ab86a028d7\httpcore5-5.2.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\3.3.7\6c380b648c302d67b5eb5a79de867909f7bbd7eb\spring-data-commons-3.3.7.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\6.1.16\bf93caa9dbc2247c0cbd3c13e2b7f3a0dfe15229\spring-orm-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\6.1.16\2cf6295ab7d9713902bfd8c123060f3632c19bbe\spring-context-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\6.1.16\c2203c1b61446c3f2a24bcfee596bdb57e0bcf8a\spring-aop-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\6.1.16\b74ae426fc0a36a41dfec593a54ce516705359a0\spring-tx-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\6.1.16\531d54d94b66362600ab3ecc081e716249b82c32\spring-beans-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\6.1.16\a4d36937b844a1f4bb493f8f18f4313d53bc85b1\spring-core-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-runtime\4.13.0\5a02e48521624faaf5ff4d99afc88b01686af655\antlr4-runtime-4.13.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\2.1.1\48b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation\1.13.9\c52e215e206d6a72fa481809a894efd20cb793fb\micrometer-observation-1.13.9.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.17.3\42c617beb411ee813bdc39a287424bfb19d99185\jackson-databind-2.17.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.17.3\4f30a05d2eee0ab700cdc27aa5967e934d3042b2\jackson-annotations-2.17.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.activation\jakarta.activation-api\2.1.3\fa165bd70cda600368eee31555222776a46b881f\jakarta.activation-api-2.1.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\6.1.16\558dd018e6a489cd85909e7f42136afe38eb4939\spring-jdbc-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\6.1.16\153594fd2dbfcd5e23913a7397736567e319794c\spring-expression-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\6.1.16\b5f2a825b4cab4868fd34bcf30b5cd566954e744\spring-jcl-6.1.16.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons\1.13.9\e13aab8d19d87c6b1ec7e983fc70c1579f5e7ba\micrometer-commons-1.13.9.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.17.3\1d6eb3e959c737692b720d3492b2f1f34c4c8579\jackson-core-2.17.3.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\4.0.5\ca84c2a7169b5293e232b9d00d1e4e36d4c3914a\jaxb-runtime-4.0.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.5.3.Final\c88fc1d8a96d4c3491f55d4317458ccad53ca663\jboss-logging-3.5.3.Final.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\6.0.6.Final\77a5f94b56d49508e0ee334751db5b78e5ccd50c\hibernate-commons-annotations-6.0.6.Final.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\io.smallrye\jandex\3.1.2\a6c1c89925c7df06242b03dddb353116ceb9584c\jandex-3.1.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.7.0\e98374da1f2143ac8e6e0a95036994bb19137a3\classmate-1.7.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.14.19\4c0c637b8f47dc08f89240e6f59900011752c97b\byte-buddy-1.14.19.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\jakarta.inject\jakarta.inject-api\2.0.1\4c28afe1991a941d7702fe1362c365f0a8641d1e\jakarta.inject-api-2.0.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.5.14\80d5d60fc4fc099c4e34f8a7268f5eea10030bfd\logback-classic-1.5.14.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.ibm.icu\icu4j\70.1\dfa3a1fbc55bf5db8c6e79fc0935ac7ab1202950\icu4j-70.1.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-core\4.0.5\7b4b11ea5542eea4ad55e1080b23be436795b3\jaxb-core-4.0.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\json-patch\1.13\c8b72249e50fe778e7df223e5b1fed1931a4a688\json-patch-1.13.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.5.14\e9e86929cf82e2009303e748c1caf131cb51c2c1\logback-core-1.5.14.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.eclipse.angus\angus-activation\2.0.2\41f1e0ddd157c856926ed149ab837d110955a9fc\angus-activation-2.0.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\4.0.5\f36a4ef12120a9bb06d766d6a0e54b144fd7ed98\txw2-4.0.5.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\4.1.2\18ec117c85f3ba0ac65409136afa8e42bc74e739\istack-commons-runtime-4.1.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\jackson-coreutils\2.0\6374371261b91b829d10f21256b2feefdf8f0a78\jackson-coreutils-2.0.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\msg-simple\1.2\a06afa2d5d75c98e54ab370107930978fc3f9937\msg-simple-1.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar,C:\Users\xxxx\.gradle\caches\modules-2\files-2.1\com.github.java-json-tools\btf\1.3\6cf5405e214cbc83337a107cdef8401fb6aa6383\btf-1.3.jar}
  activeRules: [13 kubernetes, 214 python, 24 css, 109 kotlin, 29 secrets, 265 javascript, 26 docker, 28 ruby, 477 java, 46 Web, 14 xml, 155 php, 7 terraform, 267 typescript, 7 cloudformation]
  inputFiles: [
  ]
]

 [2025-02-18T14:13:36.304] [SonarLint Server RPC request executor] ERROR sonarlint - No file to analyze
Analysis 506100d4-a39b-464d-a392-21fb9b52ef3a finished

Hey @Colin_MacDonald, it seems that your file got ignored from our analysis, as described here:

[2025-02-18T14:13:36.302] [SonarLint Server RPC request executor] DEBUG sonarlint - Filtered out URIs ignored by Git: file:///C:/xxx/src/main/java/xxx/UuidRepresentation.java

We typically ignore files in the IDE that are excluded by your .gitignore file. Could you verify if that’s the case?

SonarQube for IDE takes into account the IDE configuration, which can cause such discrepancies from the SonarQube Server.

1 Like

Thanks Nicolas, I appreciate the help.

That’s puzzling, we do have a .gitignore but the sources are allowlisted. Git and IntelliJ are happy that these files are controlled by Git - I can pull, push, diff, blame in IntelliJ without issues.

I’ve deleted the .gitignore (and for good measure .gitattributes / .gitleaksignore / .gitattributes as well), with no change to the behavior. I’ve also uninstalled and re-installed SonarQube for IDE and restarted IntelliJ to try and clear out any caches, but still see the same error.

SonarQube for IDE is definitely Git aware because when I edit the .gitignore (to delete everything and remove all denylisting) I see a log of:

 [2025-02-18T15:48:50.332] [sonarlint-analysis-engine] DEBUG sonarlint - Module file event for [uri=file:///C:/xxx/.gitignore] has been ignored because it's not a Python file.
 [2025-02-18T15:48:50.332] [sonarlint-analysis-engine] INFO sonarlint - Module file event for CREATED for file [uri=file:///C:/xxx/.gitignore] has been ignored because it's not a Kubernetes file.
 [2025-02-18T15:48:50.332] [sonarlint-analysis-engine] DEBUG sonarlint - Processing file event C:/xxx/.gitignore with event MODIFIED
 [2025-02-18T15:48:50.332] [sonarlint-file-exclusions] DEBUG sonarlint - Computing file exclusion for uri 'file:///C:/xxx/.gitignore'

However, the analysis behavior doesn’t change, even with .gitignore empty or deleted - I still see the reported log with both the Filtered out URIs ignored by Git and ERROR sonarlint - No file to analyze

Is there anything else I can do to help diagnose this? I’m eliding paths so as not to publish user or company information, which I know isn’t ideal.

That’s effectively strange, the file is definitely excluded because SonarQube for IDE found that it was ignored by a .gitignore file. Could it be that there is another one closer to the root of the project?

It could help if you could share the project structure, and perhaps the full SQ:IDE logs, right from the start.

Hmm, no, we only have one .gitignore file. The log file posted above is everything that I see during a non-connected analysis run: that’s with Analysis logs and Verbose output both enabled.

Thanks again for your interest, and is there any way that I can send you that information directly? I have to be a bit circumspect about publishing company/user/product names. I don’t see an option to send you a personal message, perhaps because I’m newly registered.

Oh, I think I see what’s happening.

Our InteliJ project has multiple modules. Each module is in its own git repo, with its own .gitignore, and they have different source paths and excludes within each module. But when the modules are in the same IntelliJ project, and SonarQube for IDE is run, one module always seems to be (arbitrarily?) selected as the baseDir for analysis, regardless of which module the open file is in.

I can run analysis on files within that module without issues. And if I comment out everything in the .gitignore for that module, then I can also run analysis on files in other modules. So it appears that the wrong .gitignore is being used to determine exclusions.

Oh, looking closely it gets even better: the baseDir seems to be cached somewhere outside of the project itself. In the screenshot below, note that the baseDir is c:\sq\module1. However, the project, modules, and file being analysed are actually in C:\test\module1 - the “sq” directory is one that I had been tinkering with previously, but I created a fresh new project and modules in order to zip it up and create a screenshot. However, SonarQube is still attempting to use the old c:\sq location, and is picking up a c:\sq\module1\.gitignore file with exclusions that would explain the “ignored” output in this screenshot.

Here’s a simple test project with two modules and .gitignore files that can be used to demonstrate the problem. I can analyse one, but not both, of the Main.java files in this project, depending on which baseDir SonarQube happens to choose.

test.zip (57.5 KB)

1 Like

You are effectively right, well done for your finding! Currently, each module has a base directory that we retrieve based on the main project. When triggering an analysis, we look at a .gitignore file within this base directory. However, in your case, the root of your project is a list of multiple modules, and it seems that IntelliJ API decides to choose the first module as base directory (and this is actually explained in their API documentation…).

I created this bug ticket that I will tackle for our next release. To avoid issues when we look at .gitignore files, each module should have the correct base directory in SonarQube for IDE.

1 Like

Ah, that makes sense - although why IntelliJ was still reporting c:\sq\module1 rather than c:\test\module1 is curious. On closing and re-opening the project again, it has now started reporting c:\test\module1

Note that it always seems to report the baseDir of a module, not of the project folder itself: I don’t know if that’s significant for the fix.

And thank you again, I really appreciate you looking into this. If there’s any more information that I can provide, please let me know.