ReplaceEmptyValues#

Replace empty values with ${EMPTY} variable.

Transformer configuration

ReplaceEmptyValues is included in the default transformers, but it can be also run separately with:

robotidy --transform ReplaceEmptyValues src

You can also disable ReplaceEmptyValues:

robotidy --configure ReplaceEmptyValues:enabled=False src

Empty variables, lists or elements in the list can be defined in a way that omits the value. To be more explicit, this transformer replace such values with ${EMPTY} variables:

*** Variables ***
${EMPTY_VALUE}
@{EMPTY_LIST}
&{EMPTY_DICT}
@{LIST_WITH_EMPTY}
...    value
...
...    value3
*** Variables ***
${EMPTY_VALUE}    ${EMPTY}
@{EMPTY_LIST}     @{EMPTY}
&{EMPTY_DICT}     &{EMPTY}
@{LIST_WITH_EMPTY}
...    value
...    ${EMPTY}
...    value3

Skip formatting#

It is possible to use the following arguments to skip formatting of the code: