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
argument-overwritten-before-usage / W0921 is raised when overriding an argument in a conditional statement. The override was on purpose and the warning should not be raised.
What command/code did you try to run?
My Keyword [Documentation] argument conditionnaly changed still shows ... argument-overwritten-before-usage / W0921[Arguments]${to print}${another arg}
IF ${another arg} != "KEEP"
VAR ${to print} "overwrite"
END
Log To Console ${to print}
That rule is bit tricky because there could be numerous reasons for variable being overwritten. The purpose was mainly to catch 'useless' arguments, for example that are always overwritten without being used.
But I agree if there is any condition, the issue shouldn't be raised - since the argument is not always overwritten but only in some cases.
What happened?
argument-overwritten-before-usage / W0921 is raised when overriding an argument in a conditional statement. The override was on purpose and the warning should not be raised.
What command/code did you try to run?
What is the full error message?
Keyword argument '${to print}' is overwritten before usagerobocop argument-overwritten-before-usage-W0921
What did you expect to happen instead?
The rule could assume that if the variable is overwritten from inside an IF clause, it is on purpose.
Operating System
Windows
Robocop version
5.0.4
The text was updated successfully, but these errors were encountered: