Skip to content

format-ReplaceRunKeywordIf, Auto-formatting not applied #1714

@Li12137

Description

@Li12137

The RoboCop linter is issuing a deprecation warning for the following code:
Return From Keyword If "${status}"=="True" "success"

The warning message is:
'Return From Keyword If' is deprecated, use 'IF and RETURN' instead

However, I have already configured RoboCop '.robot.toml' as follows:
[tool.robocop.format]
select = [
...
"ReplaceRunKeywordIf",
...
]

I've observed that the auto-formatting does work for Run Keyword If.

Run Keyword If ${host_status}==${False} Fail HOST PING FAILED!
is correctly reformatted to:
IF ${host_status}==${False} Fail HOST PING FAILED!

However, the same rule (ReplaceRunKeywordIf) does not apply to Return From Keyword If.

Despite this configuration, the auto-formatting does not seem to take effect. Is this a bug or expected behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions