Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RenameVariables should not capitalize placeholder in template #713

Closed
gohierf opened this issue Sep 4, 2024 · 2 comments · Fixed by MarketSquare/robotframework-robocop#1339
Assignees

Comments

@gohierf
Copy link

gohierf commented Sep 4, 2024

Following up on #711 and #712, I am surprised that RenameVariables capitalizes the placeholder when using keywords with embedded arguments as template. I don't think this is a good idea, what is the rational behind it?

BEFORE
image

AFTER
image

CODE TO REPRODUCE

My Test
    [Template]    My Keyword ${embedded arg}
    value1
    value2


*** Keywords ***
My Keyword ${embedded arg}
    [Documentation]    Just loging embedded arg value to console
    Log To Console    embedded arg: ${embedded arg}
@gohierf gohierf changed the title Rename variable should not capitalize placeholder in template RenameVariables should not capitalize placeholder in template Sep 4, 2024
@bhirsz
Copy link
Member

bhirsz commented Sep 4, 2024

I need to check but it does not look intentional. Typically global or unknown variables are capitalized. It looks like Robotidy consider template argument as global - but it's more of a argument, so it should be lower case.

@bhirsz
Copy link
Member

bhirsz commented Mar 23, 2025

Fixed & will be part of the Robocop 6.0 release.

Now RenameVariables converts arguments in template keyword to lower case.

@bhirsz bhirsz closed this as completed Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants