Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specific alignment for run keywords #1065

Open
gohierf opened this issue Mar 27, 2024 · 1 comment
Open

Support specific alignment for run keywords #1065

gohierf opened this issue Mar 27, 2024 · 1 comment

Comments

@gohierf
Copy link

gohierf commented Mar 27, 2024

Robocop and Robotidy have a different opinion on the alignment of the following code.

SSH Wait For Device To Close SSH
    # robocop: off=misaligned-continuation-row
    [Documentation]    Wait until SSH connection is closed by device.
    Wait Until Keyword Succeeds    2min    2s
    ...    Run Keyword And Expect Error    SSHException: SSH session not active
    ...        SSH Log FW Version    level=DEBUG

Robotidy indents the last line, to better see the keyword inside keyword call. Which I like very much.

But Robocop raises a "misaligned-continuation-row" warning W1015 on this last line.

Would it be possible for robocop rule W1015 to take into account this specific case and not raise a warning?

@bhirsz
Copy link
Member

bhirsz commented Apr 8, 2024

I was thinking about it for a while. Then I have noticed I have disabled this particular rule in my current project with "disabled because of IndentNestedKeywords transformer" comment which proves your point :). I think it's best to have behaviour of both Robocop and Robotidy as close as possible. If something is configurable (can be enabled/disabled) it should be also possible in other tool.

For this issue I can either skip all run keywords in this rule altoghether (and explain in the documentation) or better, make it configurable (ignore_run_keywords).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants