NormalizeTags#

Normalize tag names by normalizing case and removing duplicates.

Transformer configuration

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

robotidy --transform NormalizeTags src

You can also disable NormalizeTags:

robotidy --configure NormalizeTags:enabled=False src

Supported cases: lowercase (default), uppercase, title case.

You can configure case using case parameter:

robotidy --transform NormalizeTags:case=uppercase

You can remove duplicates without normalizing case by setting normalize_case parameter to False:

robotidy --transform NormalizeTags:normalize_case=False

Preserve formatting#

Tags formatting like new lines, separators or comments position will be lost when using NormalizeTags transformer. You can preserve formatting by using preserve_format flag:

robotidy --configure NormalizeTags:preserve_format=True test.robot

The downside is that the duplications will not be removed when preserve_format is enabled.

*** Test Cases ***
Test
    [Tags]    NeedNormalization_Now    # Tell some
    ...    also_need_Normalization     # interesting story
    ...     TAG                        # about those tags
*** Test Cases ***
Test
    [Tags]    neednormalization_now    also_need_normalization    tag    # Tell some    # interesting story    # about those tags
*** Test Cases ***
Test
    [Tags]    neednormalization_now    # Tell some
    ...    also_need_normalization     # interesting story
    ...     tag                        # about those tags