You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should be a new rule, not an improvement to an existing rule.
This rule would be generally useful, not specific to my code or setup.
Suggested rule title
Class method should not be invoked from an object instance
Rule description
Calling a class method from an object instance would mislead reader that the method is an object method and may affect the object itself. Call class method using class name as prefix.
Rationale
// class declaration and implemeantiontype
TFoo = class(TObject)
publicclassprocedureBar;
end;
implementationclassprocedureTFoo.Bar;
begin// do somethingend;
// callingvar
FooObj: TFoo;
begin
FooObj := TFoo.Create;
FooObj.Bar; // non-compliant
TFoo.Bar; // compliantend.
The text was updated successfully, but these errors were encountered:
Prerequisites
Suggested rule title
Class method should not be invoked from an object instance
Rule description
Calling a class method from an object instance would mislead reader that the method is an object method and may affect the object itself. Call class method using class name as prefix.
Rationale
The text was updated successfully, but these errors were encountered: