Delphi-Quellcode:
{$IFDEF _FIXINSIGHT_}[SuppressRule(W519)]{$ENDIF}
procedure TChild.someVirtualMethod();
begin
// No quack at all
end;
How long is this "SuppressRule" valid: Only for the following method or for the rest of the
unit?
We have a similar problem when dealing with string constants and localization tools automagically extracting those from the sources. It is quite common for these tools to accept a special formatted comment to ignore such a constant. If you scan the Delphi source you will find lots of comments like
{ Do not localize }
which are valid for the current line. Perhaps we can have a similar approach for FixInsight warnings.
Delphi-Quellcode:
procedure TChild.someVirtualMethod(); { FIXINSIGHT: SuppressRule(W519) }
begin
// No quack at all
end;
As the comment lies inside the method implementation the scope should be obvious. Depending on the nature of any rule other intrinsic scopes may be appropriate.