Sonarlint scanning issue in IDZ v16.0.3

Please provide

  • Operating system: windows
  • Sonar Lint plugin version: 9.0.3
  • Programming language you’re coding in: COBOL
  • Is connected mode used:
    • Connected to Sonar Cloud or SonarQube (and which version): SonarQube

Hi All, I have installed Sonar lint version 9.0.3 in IBM Developer for zos and connected successfully with the sonarqube server and I have binded the projects as well, I am facing the below issue when the scan analysis runs in eclipse:

SonarLint processing file /emea-commcards-nas/COBOL_BATCH/naba002.cbl…
Found 2 issue(s)
Error during execution of SonarLint analysis
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at java.base/java.util.Optional.flatMap(Optional.java:295)
at org.sonarlint.eclipse.core.internal.tracking.ProjectIssueTracker.lambda$3(ProjectIssueTracker.java:151)
at java.base/java.util.HashMap.forEach(HashMap.java:1337)
at org.sonarlint.eclipse.core.internal.tracking.ProjectIssueTracker.trackWithServerIssues(ProjectIssueTracker.java:150)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.trackFileIssues(AnalyzeConnectedProjectJob.java:90)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.trackIssues(AbstractAnalyzeProjectJob.java:365)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.trackIssues(AnalyzeConnectedProjectJob.java:78)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.lambda$20(AbstractAnalyzeProjectJob.java:329)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2315)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2335)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.updateMarkers(AbstractAnalyzeProjectJob.java:329)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:222)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:164)
at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarJob.run(AbstractSonarJob.java:37)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Hey @Nagaraj,

thanks for reaching out.

The SonarQube for IDE (formerly SonarLint) version you mention does not exist (maybe you mean 9.3?), but no matter what version you have, please update to the latest (10.10) as we don’t support older versions and the issue you were facing was fixed long ago.

Additionally, I would advise updating IBM Developer for z/OS as well, if possible (the currently available version of the IDz 16.y stream is 16.0.6). The reason for that is that IBM implemented a companion plug-in for SonarQube for IDE (formerly SonarLint) which contained improvements from their side as well.

Best,
Tobias