robotframework-tidy icon indicating copy to clipboard operation
robotframework-tidy copied to clipboard

RenameVariables does not work on variable in EXCEPT arguments, nor WHILE limit

Open gohierf opened this issue 1 year ago • 1 comments

I recently decided to enable RenameVariables transformer and noticed it missed variables in the EXPECT arguments.

BEFORE image

AFTER image

Code to reproduce

My Keyword
    [Arguments]  ${expected error}
    TRY
        No Operation
    EXCEPT  ${expected error}
        No Operation
    END

gohierf avatar Sep 04 '24 08:09 gohierf

It does not seem to update the variables used in WHILE's limit option either.

BEFORE

My Keyword
    [Arguments]    ${my condition}    ${my limit}
    WHILE    ${my condition}    limit=${my limit}
        No Operation
    END

AFTER

My Keyword
    [Arguments]    ${my_condition}    ${my_limit}
    WHILE    ${my_condition}    limit=${my limit}
        No Operation
    END

gohierf avatar Sep 04 '24 12:09 gohierf

Fixed - will be part of Robocop 6.0.

bhirsz avatar Mar 23 '25 14:03 bhirsz