Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when use const inline in source code #15

Open
Valdeirsk8 opened this issue Nov 4, 2023 · 1 comment
Open

Error when use const inline in source code #15

Valdeirsk8 opened this issue Nov 4, 2023 · 1 comment

Comments

@Valdeirsk8
Copy link

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

Valdeirsk8 pushed a commit to Valdeirsk8/SonarDelphi that referenced this issue Nov 4, 2023
Valdeirsk8 added a commit to Valdeirsk8/SonarDelphi that referenced this issue Nov 4, 2023
fix: fixing issue Embarcadero#15 - changing grammar to allow inline const declaration
@Cirras
Copy link

Cirras commented Nov 17, 2023

Hi @Valdeirsk8,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants