Einzelnen Beitrag anzeigen

Benutzerbild von Uwe Raabe
Uwe Raabe

Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.453 Beiträge
 
Delphi 12 Athens
 
#43

AW: Neuer FixInsight ist da!

  Alt 26. Mär 2015, 13:36
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.
Uwe Raabe
Certified Delphi Master Developer
Embarcadero MVP
Blog: The Art of Delphi Programming
  Mit Zitat antworten Zitat