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

Add option to disable variable_separator in RenameVariables transformer.

Open fialsha opened this issue 1 year ago • 1 comments

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.

fialsha avatar Apr 24 '24 11:04 fialsha

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 avatar Apr 24 '24 12:04 bhirsz