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
I have a Code Smell "Unused argument: AMyUnusedParam at TFormTest.MyComponentMyEventImplementation" for the example below
procedureTFormTest.MyComponentMyEventImplementation(AMyUnusedParam: TSomeRandomType);
begininherited;
{* Some code that doesn't use "AMyUnusedParam"*}end;
I think this rule should check if the method is a implementation of an event before mark the params as code smells.
Generally the code in events not necessarly need to use all the parameters as they exists only to comply with the event declaration.
The text was updated successfully, but these errors were encountered:
I don't think that this is possible. You cannot check generally if a method might get assigned to an event or not. A similar problem exists for interface implementations, where it is common that not every implementation uses every parameter. But you cannot know if a method fulfills an interface in a derived class.
I have a Code Smell "Unused argument: AMyUnusedParam at TFormTest.MyComponentMyEventImplementation" for the example below
I think this rule should check if the method is a implementation of an event before mark the params as code smells.
Generally the code in events not necessarly need to use all the parameters as they exists only to comply with the event declaration.
The text was updated successfully, but these errors were encountered: