sonar-openedge icon indicating copy to clipboard operation
sonar-openedge copied to clipboard

Local PCT xref not detected

Open maelstraggiotti opened this issue 3 years ago • 5 comments

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

image

Am I missing something?

Thanks

maelstraggiotti avatar Mar 07 '22 11:03 maelstraggiotti

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.

gquerret avatar Mar 07 '22 13:03 gquerret

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?

maelstraggiotti avatar Mar 07 '22 13:03 maelstraggiotti

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:

gquerret avatar Mar 07 '22 14:03 gquerret

Either would be great. In the meanwhile, I'll try to script a rename of those files. Thanks

maelstraggiotti avatar Mar 07 '22 14:03 maelstraggiotti

@maelstraggiotti See https://github.com/Riverside-Software/pct/issues/486#issuecomment-1203919090

gquerret avatar Aug 03 '22 13:08 gquerret

No news on PCT branch, closing issue

gquerret avatar Jan 06 '23 12:01 gquerret