org.sonar.l10n.delphi.rules.community-delphi.GroupedParameterDeclaration.html Maven / Gradle / Ivy
The newest version!
Why is this an issue?
Parameter declarations should not be grouped together. This affects readability, is less
convenient to change for version control purposes, and can be error-prone to modify.
How to fix it
Separate the grouped parameters explicitly:
procedure MyProc(MyName: string; MyId, MyAge: Integer);
begin
// ...
end;
procedure MyProc(MyName: string; MyId: Integer; MyAge: Integer);
begin
// ...
end;
If the grouped parameters are const
, var
, or out
parameters, make sure that each parameter has the same keywords after separating:
procedure MyProc(MyName: string; const MyId, MyAge: Integer);
begin
// ...
end;
procedure MyProc(MyName: string; const MyId: Integer; const MyAge: Integer);
begin
// ...
end;
Resources
© 2015 - 2024 Weber Informatics LLC | Privacy Policy