sonar-openedge
sonar-openedge copied to clipboard
Local PCT xref not detected
Hi, I can't make SonarLint detect Xml-Xref file generated by a local PCT build. Therefore, not Xref-based rules are considered. The file naming is different from the one generated by PSDOE :
- Pct : program.p.xref
- Psdoe : program.xref.xml

Am I missing something?
Thanks
SonarLint version ? SonarLint is only able to use the XREF generated by PDSOE ; you have to check the "Create cross-reference files in XML format" in the project configuration. You can also enable the verbose output in SonarLint view ; XREF information is displayed there.
Version 5.8.1836.
It's indeed working with PDSOE-generated Xref, but that's my point. We have a script that fetches from SCM and recompiles the changed files using PCT, generating Xrefs along the way.
After that, the user opens a file in PSDO, which is being analyzed from an out-of-date Xref file.
We must recompile from PSDOE to have a comprehensive analysis by SonarLint.
Any ideas to improve this process? Such as force PSDOE to compile and/or generate Xref on load?
There's no immediate solution, but there are two enhancements that could improve the situation:
- Have a switch in PCT that would generate the XREF files with the right name
- Have a switch in sonarlint that would tell the analyzer to use the standard XREF file name
First solution is easier to implement (and maintain) IMO, but I can't commit to any date.
In a couple months, I'll tell you to switch to VSCode plugin for OpenEdge 🙄 :stuck_out_tongue_winking_eye:
Either would be great. In the meanwhile, I'll try to script a rename of those files. Thanks
@maelstraggiotti See https://github.com/Riverside-Software/pct/issues/486#issuecomment-1203919090
No news on PCT branch, closing issue