fabriciocolombo / sonar-delphi

SonarQube Delphi Plugin
91 stars 46 forks source link

Nested functions break unused arguments rule #21

Closed Teloah closed 8 years ago

Teloah commented 8 years ago

UnusedArgumentsRule cannot find used parameters if there is a nested function or procedure.

unit NestedParams;

interface

procedure TestNestedParams(const aValue : string);

implementation

procedure TestNestedParams(const aValue : string);
// "Unused argument: 'avalue' at TestNestedParams" gets added here
var
  lData : string;

  function Update(const aParam : string) : string;
  begin
    Result := aParam + ' dummy';
  end;

begin
  lData := Update(aValue);
end;

end.