sonar-openedge
sonar-openedge copied to clipboard
No TypeInfo found with rcode somewhere in propath
Hello,
My Versions :
- Openedge 12.2.4
- sonar-openedge 2.13.1
I have 2 sonarlint and sonarscanner issues because of "No TypeInfo found for parent class".
My Case : DemoSonar.zip
- I have a project "DemoSonar" connected to Sport2000 database.
- My project has an external directory that contains external rcode in the propath (for my example it's Obj2 that is compiled from Src2 with build.xml)
- Src2 is not in my propath
- If I use a PL instead of Obj, I have the same probleme
Starting analysis with configuration:
[
projectKey: demo_sonar_archi
baseDir: D:\Openedge\workspace-oe12\DemoSonar
extraProperties: {sonar.oe.binaries=D:/Openedge/workspace-oe12/DemoSonar/Obj,D:/Openedge/workspace-oe12/DemoSonar/Obj, sonar.sources=D:\Openedge\workspace-oe12\DemoSonar\Src,D:\Openedge\workspace-oe12\DemoSonar, sonar.oe.lint.databases=D:\Openedge\workspace-oe12\DemoSonar\.sonarlint/Sport.schema, sonar.oe.propath=D:\Openedge\workspace-oe12\DemoSonar\Src,D:\Openedge\workspace-oe12\DemoSonar,D:\Openedge\workspace-oe12\DemoSonar,D:\Openedge\workspace-oe12\DemoSonar\Obj2,D:\Openedge\OE12.2.4\x64\gui\,D:\Openedge\OE12.2.4\x64\gui\adecomm.pl,D:\Openedge\OE12.2.4\x64\gui\adecomp.pl,D:\Openedge\OE12.2.4\x64\gui\adedict.pl,D:\Openedge\OE12.2.4\x64\gui\adeedit.pl,D:\Openedge\OE12.2.4\x64\gui\adeicon.pl,D:\Openedge\OE12.2.4\x64\gui\adeshar.pl,D:\Openedge\OE12.2.4\x64\gui\adeuib.pl,D:\Openedge\OE12.2.4\x64\gui\adeweb.pl,D:\Openedge\OE12.2.4\x64\gui\adexml.pl,D:\Openedge\OE12.2.4\x64\gui\dataadmin.pl,D:\Openedge\OE12.2.4\x64\gui\prodict.pl,D:\Openedge\OE12.2.4\x64\gui\protools.pl,D:\Openedge\OE12.2.4\x64\gui\OpenEdge.Core.pl,D:\Openedge\OE12.2.4\x64\gui\OpenEdge.BusinessLogic.pl,D:\Openedge\OE12.2.4\x64\gui\netlib\OpenEdge.Net.pl,D:\Openedge\OE12.2.4\x64,D:\Openedge\OE12.2.4\x64\bin}
inputFiles: [
file:/D:/Openedge/workspace-oe12/DemoSonar/Src/Core/BugSonar02.cls (UTF-8) [oe]
]
]
...
Parsing 'D:\Openedge\workspace-oe12\DemoSonar\.sonarlint/Sport.schema' with db name Sport
Parsing [uri=file:/D:/Openedge/workspace-oe12/DemoSonar/Src/Core/BugSonar02.cls]
Parsing hierarchy of '[uri=file:/D:/Openedge/workspace-oe12/DemoSonar/Src/Core/BugSonar02.cls]' - Relative 'Core\BugSonar02.cls'
RCode found: 'D:\Openedge\workspace-oe12\DemoSonar\Obj\Core\BugSonar02.r'
Parsing rcode D:\Openedge\workspace-oe12\DemoSonar\Obj\Core\BugSonar02.r
Injecting type info 'Type info Core.BugSonar02 - Parent Project1.DemoBugChild'
Listing file for '[uri=file:/D:/Openedge/workspace-oe12/DemoSonar/Src/Core/BugSonar02.cls]' not found or contains space character - Was looking for 'null'
No TypeInfo found for Project1.DemoBugChild
I have 2 bugs because of this.
- in BugSonar02 : The use of property "Contact" is marked as "Usage of default buffer for BillTo" -> false positive
- it's a property in a parent class, so it should be ok.
- in BugSonar03 : The
EMPTY TEMP-TABLE tt1.
is not understood by sonar-
No TypeInfo found for Project1.DemoBug No TypeInfo found for Project1.DemoBug Syntax error -- Src/Core/BugSonar03.cls:27:26 -- Unknown table: tt1 Error during code parsing for [uri=file:/D:/Openedge/workspace-oe12/DemoSonar/Src/Core/BugSonar03.cls] at position Src/Core/BugSonar03.cls:27:26 Initializing metadata of file file:/D:/Openedge/workspace-oe12/DemoSonar/Src/Core/BugSonar03.cls
-
Is it possible to search rcode in all the propath ? Or at least in PL files ?
Probably related to #886. I'll work on that next week.
Can you try the SonarLint version from this comment ?
Do you have your rcode mostly in PL files ? Or as .r files in a directory ?
All our rcode is in projects in the workspace = rcode in directory, currently source & rcode are in same directory.
I will try your sonarlint version next week.
In a few cases I use directories from other projects directly, but most of the time I use PL files.
For me, PL files should be considered as binaries by default, both in sonarlint and in sonar-scanner.
@cverbiest You can try this version of the OE plugin: https://ci.rssw.eu/job/sonar-openedge/job/bugfix%252FSOE-886-SonarLint/ The modification is done at the analyzer level, not at the SonarLint level ; you can keep the previous SonarLint version, it doesn't hurt. @clement-brodu The version mentioned above reads the class hierarchy in the propath and not only in the binaries directories (when in SonarLint). It doesn't read from PL files for now, I'll send an update later.
@gquerret I see a change in behaviour
Parsing [uri=file:/C:/Users/cvb/git/develop/smartlisafin/SmartFinFrontend/src/be/cce/dotnet/finbkh/Finboek/FinboekViewerLogic.cls]
Parsing hierarchy of '[uri=file:/C:/Users/cvb/git/develop/smartlisafin/SmartFinFrontend/src/be/cce/dotnet/finbkh/Finboek/FinboekViewerLogic.cls]' - Relative 'be\cce\dotnet\finbkh\Finboek\FinboekViewerLogic.cls'
RCode found: 'C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src\be\cce\dotnet\finbkh\Finboek\FinboekViewerLogic.r'
Parsing rcode C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src\be\cce\dotnet\finbkh\Finboek\FinboekViewerLogic.r
Injecting type info 'Type info be.cce.dotnet.finbkh.Finboek.FinboekViewerLogic - Parent be.cce.SmartTools.SmartComponents.CceViewerLogic'
Parsing rcode C:\Users\cvb\git\develop\ccesmarttools\CceSmartTools\src\be\cce\SmartTools\SmartComponents\CceViewerLogic.r
Injecting type info 'Type info be.cce.SmartTools.SmartComponents.CceViewerLogic - Parent Consultingwerk.SmartComponents.Base.SmartViewerLogic'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Base\SmartViewerLogic.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Base.SmartViewerLogic - Parent Progress.Lang.Object'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Interfaces\ISmartViewerLogicWithEvents.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Interfaces.ISmartViewerLogicWithEvents - Parent Progress.Lang.Object'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Interfaces\ISmartViewerLogic.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Interfaces.ISmartViewerLogic - Parent Progress.Lang.Object'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Interfaces\ISmartViewerLogic.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Interfaces.ISmartViewerLogic - Parent Progress.Lang.Object'
Listing file for '[uri=file:/C:/Users/cvb/git/develop/smartlisafin/SmartFinFrontend/src/be/cce/dotnet/finbkh/Finboek/FinboekViewerLogic.cls]' not found or contains space character - Was looking for 'null'
No TypeInfo found for IrNrReference
No TypeInfo found for SjnCodeReference
No TypeInfo found for BtlCodeReference
No TypeInfo found for BtmCodeReference
No TypeInfo found for MtCodeReference
CceViewerLogic.r is now found, I still see a lot of No TypeInfo found for ...
I get a lot of Unable to report 'UnusedBuffer' rule for buffer 'ttViewerBoundControls', ttViewerBoundControls is a protected temp-table defined in CceViewerLogic.
ActiveRule - Internal key - Repository rssw-oe-main - Rule eu.rssw.antlr.proparse.checks.UnusedBuffer
Unable to report 'UnusedBuffer' rule for buffer 'ttViewerBoundControls' to 'ttViewerBoundControls'
Unable to report 'UnusedBuffer' rule for buffer 'ttViewerBoundControls' to 'ttViewerBoundControls'
Unable to report 'UnusedBuffer' rule for buffer 'ttViewerBoundControls' to 'ttViewerBoundControls'
Unable to report 'UnusedBuffer' rule for buffer 'ttViewerBoundControls' to 'ttViewerBoundControls'
Unable to report 'UnusedBuffer' rule for buffer 'ttViewerBoundControls' to 'ttViewerBoundControls'
// trimmed
Not sure yet but I have the impression it's a slower. I found my eclipse environement is stuck waiting for
- Update Sonarlint binding
- A sonar scan I tried to cancel thos but it does not respond https://i.imgur.com/Nnv8In8.png
I'll re-test after eclipse restart
performance looks OK after eclipse restart.
protected temp-table issue looks solved but I still get No TypeInfo found for ...
errors for classes that have rcode
OpenEdge plugin version: 2.14.0-SNAPSHOT-${git.commit}
Loading OpenEdge settings for server ID xxxxxx
Adding source directory 'src' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src'
Adding binaries directory 'C:\Users\cvb\git\develop\ccesmarttools\CceSmartTools\src' ...
... resolved to 'C:\Users\cvb\git\develop\ccesmarttools\CceSmartTools\src'
Adding binaries directory 'C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk' ...
... resolved to 'C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk'
Adding binaries directory 'C:\Users\cvb\git\develop\smartcomponentlibrary\src' ...
... resolved to 'C:\Users\cvb\git\develop\smartcomponentlibrary\src'
Adding binaries directory 'C:\Users\cvb\git\develop\smartcomponentlibrary' ...
... resolved to 'C:\Users\cvb\git\develop\smartcomponentlibrary'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisafin\SmartFinCommon\src' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisafin\SmartFinCommon\src'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisa\SmartLisaCommon\src' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisa\SmartLisaCommon\src'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisafin\SmartFinBackend\src' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisafin\SmartFinBackend\src'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisafin\FinLegacy' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisafin\FinLegacy'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisafin\FinLegacy\src' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisafin\FinLegacy\src'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisa\CceRtbIntegration\src\Common' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisa\CceRtbIntegration\src\Common'
Adding binaries directory 'C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend' ...
... resolved to 'C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend'
Adding binaries directory 'C:\Progress\oe122\gui\' ...
... resolved to 'C:\Progress\oe122\gui'
Adding binaries directory 'C:\Progress\oe122\gui\adecomm.pl' ...
... resolved to 'C:\Progress\oe122\gui\adecomm.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adecomp.pl' ...
... resolved to 'C:\Progress\oe122\gui\adecomp.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adedict.pl' ...
... resolved to 'C:\Progress\oe122\gui\adedict.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adeedit.pl' ...
... resolved to 'C:\Progress\oe122\gui\adeedit.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adeicon.pl' ...
... resolved to 'C:\Progress\oe122\gui\adeicon.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adeshar.pl' ...
... resolved to 'C:\Progress\oe122\gui\adeshar.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adeuib.pl' ...
... resolved to 'C:\Progress\oe122\gui\adeuib.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adeweb.pl' ...
... resolved to 'C:\Progress\oe122\gui\adeweb.pl'
Adding binaries directory 'C:\Progress\oe122\gui\adexml.pl' ...
... resolved to 'C:\Progress\oe122\gui\adexml.pl'
Adding binaries directory 'C:\Progress\oe122\gui\dataadmin.pl' ...
... resolved to 'C:\Progress\oe122\gui\dataadmin.pl'
Adding binaries directory 'C:\Progress\oe122\gui\prodict.pl' ...
... resolved to 'C:\Progress\oe122\gui\prodict.pl'
Adding binaries directory 'C:\Progress\oe122\gui\protools.pl' ...
... resolved to 'C:\Progress\oe122\gui\protools.pl'
Adding binaries directory 'C:\Progress\oe122\gui\OpenEdge.Core.pl' ...
... resolved to 'C:\Progress\oe122\gui\OpenEdge.Core.pl'
Adding binaries directory 'C:\Progress\oe122\gui\OpenEdge.BusinessLogic.pl' ...
... resolved to 'C:\Progress\oe122\gui\OpenEdge.BusinessLogic.pl'
Adding binaries directory 'C:\Progress\oe122\gui\netlib\OpenEdge.Net.pl' ...
... resolved to 'C:\Progress\oe122\gui\netlib\OpenEdge.Net.pl'
Adding binaries directory 'C:\Progress\oe122' ...
... resolved to 'C:\Progress\oe122'
Adding binaries directory 'C:\Progress\oe122\bin' ...
... resolved to 'C:\Progress\oe122\bin'
No sonar.oe.dotpct property, defaults to <binaries>/.pct directories
Using PROPATH : C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src,C:\Users\cvb\git\develop\ccesmarttools\CceSmartTools\src,C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk,C:\Users\cvb\git\develop\smartcomponentlibrary\src,C:\Users\cvb\git\develop\smartcomponentlibrary,C:\Users\cvb\git\develop\smartlisafin\SmartFinCommon\src,C:\Users\cvb\git\develop\smartlisa\SmartLisaCommon\src,C:\Users\cvb\git\develop\smartlisafin\SmartFinBackend\src,C:\Users\cvb\git\develop\smartlisafin\FinLegacy,C:\Users\cvb\git\develop\smartlisafin\FinLegacy\src,C:\Users\cvb\git\develop\smartlisa\CceRtbIntegration\src\Common,C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend,C:\Progress\oe122\gui\,C:\Progress\oe122\gui\adecomm.pl,C:\Progress\oe122\gui\adecomp.pl,C:\Progress\oe122\gui\adedict.pl,C:\Progress\oe122\gui\adeedit.pl,C:\Progress\oe122\gui\adeicon.pl,C:\Progress\oe122\gui\adeshar.pl,C:\Progress\oe122\gui\adeuib.pl,C:\Progress\oe122\gui\adeweb.pl,C:\Progress\oe122\gui\adexml.pl,C:\Progress\oe122\gui\dataadmin.pl,C:\Progress\oe122\gui\prodict.pl,C:\Progress\oe122\gui\protools.pl,C:\Progress\oe122\gui\OpenEdge.Core.pl,C:\Progress\oe122\gui\OpenEdge.BusinessLogic.pl,C:\Progress\oe122\gui\netlib\OpenEdge.Net.pl,C:\Progress\oe122,C:\Progress\oe122\bin
Adding C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src to PROPATH
Adding C:\Users\cvb\git\develop\ccesmarttools\CceSmartTools\src to PROPATH
Adding C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk to PROPATH
Adding C:\Users\cvb\git\develop\smartcomponentlibrary\src to PROPATH
Adding C:\Users\cvb\git\develop\smartcomponentlibrary to PROPATH
Adding C:\Users\cvb\git\develop\smartlisafin\SmartFinCommon\src to PROPATH
Adding C:\Users\cvb\git\develop\smartlisa\SmartLisaCommon\src to PROPATH
Adding C:\Users\cvb\git\develop\smartlisafin\SmartFinBackend\src to PROPATH
Adding C:\Users\cvb\git\develop\smartlisafin\FinLegacy to PROPATH
Adding C:\Users\cvb\git\develop\smartlisafin\FinLegacy\src to PROPATH
Adding C:\Users\cvb\git\develop\smartlisa\CceRtbIntegration\src\Common to PROPATH
Adding C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend to PROPATH
Adding C:\Progress\oe122\gui to PROPATH
Adding C:\Progress\oe122\gui\adecomm.pl to PROPATH
Adding C:\Progress\oe122\gui\adecomp.pl to PROPATH
Adding C:\Progress\oe122\gui\adedict.pl to PROPATH
Adding C:\Progress\oe122\gui\adeedit.pl to PROPATH
Adding C:\Progress\oe122\gui\adeicon.pl to PROPATH
Adding C:\Progress\oe122\gui\adeshar.pl to PROPATH
Adding C:\Progress\oe122\gui\adeuib.pl to PROPATH
Adding C:\Progress\oe122\gui\adeweb.pl to PROPATH
Adding C:\Progress\oe122\gui\adexml.pl to PROPATH
Adding C:\Progress\oe122\gui\dataadmin.pl to PROPATH
Adding C:\Progress\oe122\gui\prodict.pl to PROPATH
Adding C:\Progress\oe122\gui\protools.pl to PROPATH
Adding C:\Progress\oe122\gui\OpenEdge.Core.pl to PROPATH
Adding C:\Progress\oe122\gui\OpenEdge.BusinessLogic.pl to PROPATH
Adding C:\Progress\oe122\gui\netlib\OpenEdge.Net.pl to PROPATH
Adding C:\Progress\oe122 to PROPATH
Adding C:\Progress\oe122\bin to PROPATH
CPD annotation : 'Generated'
CPD skip method : ''
CPD skip procedure : ''
Using backslash as escape character : false
XML XREF filter activated
Parsing [uri=file:/C:/Users/cvb/git/develop/smartlisafin/SmartFinFrontend/src/be/cce/dotnet/finbkh/Finboek/FinboekViewerLogic.cls]
Parsing hierarchy of '[uri=file:/C:/Users/cvb/git/develop/smartlisafin/SmartFinFrontend/src/be/cce/dotnet/finbkh/Finboek/FinboekViewerLogic.cls]' - Relative 'be\cce\dotnet\finbkh\Finboek\FinboekViewerLogic.cls'
RCode found: 'C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src\be\cce\dotnet\finbkh\Finboek\FinboekViewerLogic.r'
Parsing rcode C:\Users\cvb\git\develop\smartlisafin\SmartFinFrontend\src\be\cce\dotnet\finbkh\Finboek\FinboekViewerLogic.r
Injecting type info 'Type info be.cce.dotnet.finbkh.Finboek.FinboekViewerLogic - Parent be.cce.SmartTools.SmartComponents.CceViewerLogic'
Parsing rcode C:\Users\cvb\git\develop\ccesmarttools\CceSmartTools\src\be\cce\SmartTools\SmartComponents\CceViewerLogic.r
Injecting type info 'Type info be.cce.SmartTools.SmartComponents.CceViewerLogic - Parent Consultingwerk.SmartComponents.Base.SmartViewerLogic'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Base\SmartViewerLogic.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Base.SmartViewerLogic - Parent Progress.Lang.Object'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Interfaces\ISmartViewerLogicWithEvents.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Interfaces.ISmartViewerLogicWithEvents - Parent Progress.Lang.Object'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Interfaces\ISmartViewerLogic.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Interfaces.ISmartViewerLogic - Parent Progress.Lang.Object'
Parsing rcode C:\Users\cvb\git\develop\smartcomponentlibrary\Consultingwerk\SmartComponents\Interfaces\ISmartViewerLogic.r
Injecting type info 'Type info Consultingwerk.SmartComponents.Interfaces.ISmartViewerLogic - Parent Progress.Lang.Object'
Listing file for '[uri=file:/C:/Users/cvb/git/develop/smartlisafin/SmartFinFrontend/src/be/cce/dotnet/finbkh/Finboek/FinboekViewerLogic.cls]' not found or contains space character - Was looking for 'null'
No TypeInfo found for IrNrReference
No TypeInfo found for SjnCodeReference
No TypeInfo found for BtlCodeReference
...
This is being worked on at the SonarLint level. News will posted as soon as a stable version is available.
I also see a lot of these warnings in my log. Release 2.14.5
I guess that because of this, the "Conversion from can overflow" rule doesn't work reliably in sonarlint. For example, i don't get any errors with enums.
liValue = INTEGER(loThatEnum:GetValue())
No TypeInfo found for enum.ThatEnum
The issues are all found correctly in the overnight sonar scan.
The "No TypeInfo found" messages are shown when Proparse can't find the rcode for a class reference. There's still a pending change in the SonarLint dev branch, I'll try to push a build to anybody interested (as a test version).
Fixed in 2.16.
I still have a lot of "No TypeInfo" in sonarlint with 2.17.0