Sonarlint 10.0.1 with eclipse for cobol analysis - not working

Please provide

  • Operating system: Windows 10
  • SonarLint plugin version: 10.0.1
  • Programming language you’re coding in: COBOL
  • Is connected mode used: Yes
    • Connected to SonarCloud or SonarQube (and which version): SonarQube

And a thorough description of the problem / question:

getting error after followed correct configuration like sonar binding and project settings like file exclusions etc… it is failing with below errors:

An internal error occurred during: "SonarLint - Propagate FileSystem changes".
org/sonarlint/eclipse/core/analysis/IFileLanguageProvider.language(Lorg/sonarlint/eclipse/core/resource/ISonarLintFile;)Lorg/sonarlint/eclipse/core/analysis/SonarLintLanguage;

also when we manually triggering analyse for cobol componenet then getting below error

Error during execution of SonarLint analysis
java.lang.IllegalStateException: Unable to get exclusions
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.lambda$3(FileExclusionsChecker.java:76)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.filterExcludedFiles(FileExclusionsChecker.java:71)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.isExcluded(FileExclusionsChecker.java:91)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.lambda$4(AnalyzeProjectJob.java:145)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.doRun(AnalyzeProjectJob.java:143)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarJob.run(AbstractSonarJob.java:37)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
	at org.sonarlint.eclipse.core.internal.utils.JobUtils.waitForFuture(JobUtils.java:60)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.lambda$3(FileExclusionsChecker.java:74)
	... 8 more
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
	at org.sonarsource.sonarlint.core.rpc.protocol.SingleThreadedMessageConsumer.lambda$new$0(SingleThreadedMessageConsumer.java:51)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:839)

Hey @kmura86,

thanks for reaching out. The first issue about the internal error is known but it is actually (despite the stack trace) not an issue with SonarLint but with your COBOL-IDE that you use.
Please provide me with the one you are using (e.g. IBM Developer for z/OS (IDz) is from IBM, Topaz Workbench is from BMC). After that I can forward you to the specific vendor to open a ticket there.

For the second issue it is more interesting. Can you please test with the latest version just released (10.2.0.81875) and provide us with all the logs you can find? Can you please also describe what exactly you did and the context? The issue was mentioned to us multiple times but we cannot reproduce it reliable enough to fix it on all axis.

Best,
Tobias

1 Like

Hi @kmura86,

in case you are using IBM Developer for z/OS (IDz), they just released an update for it that fixes incompatibility issues with SonarLint.

The secondary issue you’re mentioning (with file exclusions) is fixed in THIS ticket on our side and will be part of the next release.

Best,
Tobias

1 Like