SonarLint does not show issues only present on the server

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

We use Jenkins jobs to analyze our COBOL applications with the SonarQube scanner, which have access to most required copybooks. Our developers, however, usually only have the programs and copybooks they work on in their workspaces. As a result, SonarLint is unable to find some issues locally because it is missing the necessary copybooks.
I was expecting that SonarLint would also show issues that are only present on the server (at least it seems to be fetching issues from the server, according to the console). However, this does not seem to be the case; it only shows issues that it finds locally. As a consequence, our developers need to use the Web UI for a complete listing of issues, which feels cumbersome.
Is there some way to have SonarLint show issues only present on the server in addition to those it finds locally?

Hello @holgerknoche,
SonarLint only fetches the issues status, in order to not show in Eclipse the issues that were suppressed in SonarQube. Reporting locally the issues that were detected in SonarQube but not locally is tricky because SonarLint won’t have a way to verify whether you effectively fixed them; in other words, it would end up reporting issues that you already fixed.

We use Jenkins jobs to analyze our COBOL applications with the SonarQube scanner, which have access to most required copybooks. Our developers, however, usually only have the programs and copybooks they work on in their workspaces.

How are those copybooks retrieved by your developers exactly?
I am wondering whether running the same steps locally that you already run in Jenkins in order to have all the copybooks available to SonarLint would be an option for you. Are your copybooks retrieved from the mainframe or from a git repository? I would be curious to know whether there is something preventing your to retrieve them all locally.

1 Like

Hello Marco,

thanks for your reply. As for your question: There is nothing fundamental that prevents us from retrieving all copybooks locally, it just was not necessary until now and we would have to put in some effort to integrate this nicely into our existing tooling. But I guess we will to that now :slight_smile: