Embedded Eclipse Sonarlint not showing PHP issues after upgrade from 7.5.0.54140

Embedded Sonarlint 7.5.0.54140 was working fine on a Win10 Eclipse analyzing remote (via RSE) PHP files, either standalone or in a project.
After upgrading to 7.6.0.58887 or higher version no issues are found, no errors in console.

With 7.6 I get the following console log:

Starting SonarLint for Eclipse 7.6.0.58887
Initializing SonarLint backend...
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-secrets-plugin-1.2.0.53269.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-php-plugin-3.25.0.9077.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-html-plugin-3.7.1.3306.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-javascript-plugin-9.12.1.20358.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-java-plugin-7.15.0.30507.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-python-plugin-3.21.0.10628.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-xml-plugin-2.6.1.3686.jar
  - C:\Users\XXX\eclipse\configuration\org.eclipse.osgi\1686\0\.cp\plugins\sonar-secrets-plugin-1.2.0.53269.jar
  - C:\Users\XXX\eclipse\configuration\org.eclipse.osgi\1686\0\.cp\plugins\sonar-php-plugin-3.25.0.9077.jar
  - C:\Users\XXX\eclipse\configuration\org.eclipse.osgi\1686\0\.cp\plugins\sonar-html-plugin-3.7.1.3306.jar
  - C:\Users\XXX\eclipse\configuration\org.eclipse.osgi\1686\0\.cp\plugins\sonar-javascript-plugin-9.12.1.20358.jar
  - C:\Users\XXX\eclipse\configuration\org.eclipse.osgi\1686\0\.cp\plugins\sonar-java-plugin-7.15.0.30507.jar
  - C:\Users\XXX\eclipse\configuration\org.eclipse.osgi\1686\0\.cp\plugins\sonar-python-plugin-3.21.0.10628.jar
  - C:\Users\XXX\eclipse\configuration\org.eclipse.osgi\1686\0\.cp\plugins\sonar-xml-plugin-2.6.1.3686.jar
Found Secrets detection plugin: bundleentry://1686.fwk102847243/plugins/sonar-secrets-plugin-1.2.0.53269.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-secrets-plugin-1.2.0.53269.jar
Found JS/TS plugin: bundleentry://1686.fwk102847243/plugins/sonar-javascript-plugin-9.12.1.20358.jar
Plugin extracted to file:/C:/Users/XXX3/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-javascript-plugin-9.12.1.20358.jar
Found HTML plugin: bundleentry://1686.fwk102847243/plugins/sonar-html-plugin-3.7.1.3306.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-html-plugin-3.7.1.3306.jar
Found XML plugin: bundleentry://1686.fwk102847243/plugins/sonar-xml-plugin-2.6.1.3686.jar
Plugin extracted to file:/C:/Users/XXX/eclipse/configuration/org.eclipse.osgi/1686/0/.cp/plugins/sonar-xml-plugin-2.6.1.3686.jar
Started security hotspot handler on port 64120

But nothing is starting.
With 7.5 the log is much longer and begins with:

Starting SonarLint for Eclipse 7.5.0.54140
Started security hotspot handler on port 64120
Trigger: STARTUP
Clear markers on 0 excluded files
SonarLint processing file /RemoteSystemsTempFiles/XXXs/ytd.php...
Wrote build info to: C:\Users\XXX\.metadata\.plugins\org.eclipse.core.resources\.projects\RemoteSystemsTempFiles\org.sonarlint.eclipse.core\sonarlint17264220176764386362\build-wrapper-dump.json
Standalone mode (project not bound)
.... more lines ....
Starting PHP rules
1 source file to be analyzed
Initializing metadata of file file:/C:/Users/XXX/RemoteSystemsTempFiles/xx.xx.xx.xx/ytd.php
1/1 source file has been analyzed
Execute Sensor: Analyzer for "php.ini" files
Execute Sensor: Sonar Secrets Detection Sensor
Found 2 issue(s)
0 entries removed from the store
Done in 6538 ms

I have tried to upgrade up to 7.9 with no changes.
Downgrading still works fine, I checked down to 6.2.

Any idea or additional tests I could perform?

Hi,

Welcome to the community!

Can you confirm that you’re on a recent (latest?) version of Eclipse?

 
Thx,
Ann

Yes, it’s the latest PHP Eclipse.
I have also tried a clean install with a new workspace with no difference.

Luigi

1 Like

Hi @luigif

You are using RSE, right? I can reproduce the issue. In my case I have a more explicit stacktrace:

SonarLint processing file /localhost_sample-vuejs/src/sample.php...
Standalone mode (project not bound)
Starting analysis with configuration:
[
  baseDir: /home/julien.henry/runtime-EclipseApplication/.metadata/.plugins/org.eclipse.core.resources/.projects/localhost_sample-vuejs/org.sonarlint.eclipse.core/sonarlint6883924794818981212
  extraProperties: {}
  moduleKey: null
  excludedRules: []
  includedRules: []
  ruleParameters: {}
  inputFiles: [
    rse://LOCALHOST/home/julien.henry/Projects/sample-vuejs/src/sample.php (UTF-8)
  ]
]

Creating transient module container
Start analysis
Index files
Language of file 'rse://LOCALHOST/home/julien.henry/Projects/sample-vuejs/src/sample.php' is detected to be 'PHP'
1 file indexed
'JavaSensor' skipped because there is no related files in the current project
'Python Sensor' skipped because there is no related files in the current project
Execute Sensor: HTML
'XML Sensor' skipped because there is no related files in the current project
Execute Sensor: PHP sensor
Starting PHP symbol indexer
1 source file to be analyzed
Unable to analyze file: [uri=rse://LOCALHOST/home/julien.henry/Projects/sample-vuejs/src/sample.php]
java.nio.file.FileSystemNotFoundException: Provider "rse" not installed
	at java.base/java.nio.file.Path.of(Path.java:212)
	at java.base/java.nio.file.Paths.get(Paths.java:98)
	at org.sonar.php.tree.symbols.DeclarationVisitor.<init>(DeclarationVisitor.java:98)
	at org.sonar.php.tree.symbols.SymbolTableImpl.create(SymbolTableImpl.java:63)
	at org.sonar.plugins.php.SymbolScanner.lambda$createSymbolTable$1(SymbolScanner.java:116)
	at org.sonar.DurationStatistics.time(DurationStatistics.java:55)
	at org.sonar.plugins.php.SymbolScanner.createSymbolTable(SymbolScanner.java:116)
	at org.sonar.plugins.php.SymbolScanner.scanFile(SymbolScanner.java:83)
	at org.sonar.plugins.php.Scanner.processFile(Scanner.java:116)
	at org.sonar.plugins.php.Scanner.execute(Scanner.java:76)
	at org.sonar.plugins.php.Scanner.execute(Scanner.java:62)
	at org.sonar.plugins.php.SymbolScanner.execute(SymbolScanner.java:57)
	at org.sonar.plugins.php.PHPSensor.execute(PHPSensor.java:100)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:75)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:66)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:833)

1/1 source file has been analyzed

I have created a ticket but don’t expect a quick fix, as supporting non-local projects is very difficult for our analyzers. We will discuss internally if there is something we can do.

Yes @Julien_HENRY, I’m using RSE.
I also sometime get the same “Provider rse not installed” error in log, but not always.

I understand that support for remote projects might be hard, but maybe supporting the analysis of standalone files could be easier and pretty sufficient.
Anyway pre 7.6 it was working fine.