0
Under review
W508 False positive when assigning to a property
Assigning to a property might have side effects that make it necessary to make two successive assignment, e.g.:
procedure RestartTimer;
begin
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
Difficult to determine whether this is a problem or not.
Maybe we could have a special comment like this:
// FixInsight:NoW512: duplicate assignment necessary
// ^- this part for FixInsight ^- This part for the developer
to get rid of these warnings once we have checked them?
So, this would no longer raise this warning:
procedure RestartTimer;
begin
// FixInsight:NoW512: duplicate assignment necessary
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
procedure RestartTimer;
begin
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
Difficult to determine whether this is a problem or not.
Maybe we could have a special comment like this:
// FixInsight:NoW512: duplicate assignment necessary
// ^- this part for FixInsight ^- This part for the developer
to get rid of these warnings once we have checked them?
So, this would no longer raise this warning:
procedure RestartTimer;
begin
// FixInsight:NoW512: duplicate assignment necessary
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
Customer support service by UserEcho
{$IFNDEF _FIXINSIGHT_}This functionality is rather primitive though. It allows you to turn off any analysis, not only a single warning. A more comprehensive approach is still in the development. It will be available in future releases.procedure RestartTimer;
begin // this code will be ignored
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
{$ENDIF}