robotframework-tidy
robotframework-tidy copied to clipboard
RenameVariables transformer: Variable separator setting affects Converting camelCase to snake_case
Configuring RenameVariables:variable_separator to anything not default (underscore), e.g. space or ignore affects RenameVariables:convert_camel_case converter behaviour.
If variable_separator=space - ${myVar} is converted to ${my var}.
If variable_separator=ignore - ${myVar} is converted to ${my var}
Only when variable_separator=underscore or not configured - ${myVar} is converted to ${my_var}, as it should.
I am not sure this is intended behavior as documentation states that RenameVariables:convert_camel_case is "Converting camelCase to snake_case". snake_case uses underscore by definition.
If the behaviour is intended, perhaps it will be better to follow the default separator for convert_camel_case when setting variable_separator=ignore.
E.g.: if variable_separator=ignore - ${myVar} should be converted to ${my_var}
P.S. Variables that are not converted from camelCase seem to follow variable_separator setting correctly. Thanks!