Closed FLuzzi-csw closed 9 months ago
Hi @FLuzzi-csw,
Thanks for the bug report! @fourls actually ran across this problem just today while working on some new internal QA checks for the analyzer.
This one is high priority, so we'll have it fixed soon.
Can confirm I encountered this today! From my initial analysis, it shouldn't be too tricky to fix.
What a coincidence! Thanks for the fast response 👍
Prerequisites
SonarDelphi version
1.1.0
SonarQube version
9.9.3
Issue description
Problem
When defining a
type
called the same as an imported library,sonar-delphi
scan crashes. This happens even ifsonar.delphi.unitScopeNames
is correctly populated.Expected
A rule catching this code smell Related to #62
Steps to reproduce
sonar.delphi.unitScopeNames
toWinApi
type TSample = class(TObject) private end;
Windows = TSample;
begin try Writeln('Hello World!'); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.