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

Add option to disable variable_separator in RenameVariables transformer. #682

Closed
fialsha opened this issue Apr 24, 2024 · 1 comment · Fixed by #686
Closed

Add option to disable variable_separator in RenameVariables transformer. #682

fialsha opened this issue Apr 24, 2024 · 1 comment · Fixed by #686
Assignees
Labels
enhancement New feature or request

Comments

@fialsha
Copy link

fialsha commented Apr 24, 2024

Enhancement request: add option to disable variable_separator in RenameVariables transformer.

Currently, RenameVariables:variable_separator can only be configured to underscore or space.
We would like to disable it completely, but still use rest of the capabilities of RenameVariables transformer.
Something like:

robotidy -c RenameVariables:variable_separator=False

Use case
We use variables in the following format to represent nested values in YAML files:

MY_VAR__NESTED_VAR_1__NESTED_VAR_2

The RenameVariables:variable_separator transformer interferes with these variables.

@bhirsz
Copy link
Member

bhirsz commented Apr 24, 2024

I've looked in the source code and it looks doable. We always convert to one format and then either to space or underscore but I can add option to not convert at all. Since the parameter is str (underscore / space) I would add third value (ie "ignore")

@bhirsz bhirsz self-assigned this Apr 26, 2024
@bhirsz bhirsz added the enhancement New feature or request label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants