Skip to content

ReplaceRunKeywordIf should remove unnecessary ELSE branch #192

@bhirsz

Description

@bhirsz

This 'trick' was used to overwrite some variable with keyword value under some condition:

    ${variable}    Run Keyword If    ${something}
    ...    Catenate    ${variable}    sed -i 's/substring/${OTHER}calc/' file.conf ;
    ...    ELSE    Set Variable    ${variable}

While converting it to IF we end up with:

IF    ${something}
    ${variable}    Catenate    ${variable}    sed -i 's/substring/${OTHER}calc/' file.conf ;
ELSE
    ${variable}    Set Variable    ${variable}
END

while it could be just:

IF    ${something}
    ${variable}    Catenate    ${variable}    sed -i 's/substring/${OTHER}calc/' file.conf ;
END

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions