Starting with v18.104.22.168, IBM Developer for z Systems (IDz) supports SonarLint
v3.2.0 and above on-the-fly feedback to developers regarding bugs and quality issues in their host COBOL and PLI code.
Once the SonarLint Eclipse extensions are downloaded and installed into your IDz client, you can connect to a SonarQube server using the SonarQube Servers view and then bind an MVS subproject to a SonarQube server and project using the subproject's context menu.
Now, when a COBOL or PLI file in the bound subproject is opened with the COBOL or PLI editors, any code which violates one of the rules set up in the SonarQube project, will be marked in the file with explanations visible through hover help. The list of all issues found in the file is available in the SonarLint On-The-Fly view.
[caption id="attachment_7772" align="aligncenter" width="1030"] Opening a COBOL or PLI file from a bound MVS subproject triggers a SonarLint analysis[/caption]
TIP: If no issue annotations show up in the editor, SonarLint may not have been able to successfully parse the file. You can check the SonarLint Console under the Eclipse Console view to look for any issues such as missing include files (copybooks). Use the SYSLIB field in the subproject's associated property group as usual to resolve include file references.
Instead of opening individual files, you can select one or more files or even the subproject itself and click SonarLint->Analyze. The resulting issues will be reported in the SonarLint Report view where you can double click on an issue to be taken to the associated line of code in the editor. Alternatively, you can right mouse click on an issue and select Rule description to be taken to the SonarLint Rule Description view and a detailed description of the rule with compliant and non-compliant code examples.
[caption id="attachment_7771" align="aligncenter" width="1029"] Multiple files can be analyzed simultaneously and the resulting issues reviewed in the SonarLint Report view[/caption]
TIP: When using the Analyze function, copybooks for files which have not been opened in the editor recently may not be found because SonarLint makes use of a local file cache which is only populated when files or their dependents are opened in one of the IDz editors.