Embarcadero / SonarDelphi

Embarcadero's official version of the Sonar-Delphi plugin for use to analyze Delphi projects with SonarQube. Working to collect updates and contributions from other versions into this one and move if forward with new features.
GNU Lesser General Public License v2.1
63 stars 13 forks source link

Error when use const inline in source code #15

Open Valdeirsk8 opened 1 year ago

Valdeirsk8 commented 1 year ago

When we have a const inline statement in the code the sonar plugin raise an error;


Test Case

unit Unit1;

interface

implementation

procedure Test();
begin
  with FComponent do
  begin
    const lInlineConst: integer = 1;
    InternalField := 1;
  end;
end;

C:...\delphi\PMDTest\unit18040698869135927507.pas line 11:4 mismatched input 'const' expecting END C:...\delphi\PMDTest\unit18040698869135927507.pas line 13:5 mismatched input ';' expecting DOT


SonarQube Version = 10.2.0.77647 SonarDelphi = 1.0.8

Cirras commented 1 year ago

Hi @Valdeirsk8,

Inline var and const declarations are supported by: integrated-application-development/sonar-delphi