Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Who knows which extention fomat my code, It's really boring.

75 views
Skip to first unread message

Wentao Ma (Charis)

unread,
Aug 13, 2024, 11:38:40 PM8/13/24
to robotframework-users
Hi all RF lovers, 
Recently , I found that my code if fomated automaticly when 'cmd + s' .
I want to know witch extention of VS code did it and how to fix it.

1. Arguments are lined up . I do not like this . For me , different lines of arguments feeding different keywords. A column of arguements made me upset.
2. IF + CONTINUE statement is formated to one line and without ’END' . It can not work properly.
badformat.png

Best wishes to all ~

Bartłomiej Hirsz

unread,
Aug 14, 2024, 1:27:21 AM8/14/24
to mawen...@gmail.com, robotframework-users

It is Robocorp . But it is doing it through third party program Robotidy. Robocorp is highlighting your code so you just want to either disable Robotidy formatting in Robocorp settings or update Robotidy default settings to not format arguments (it is most likely SplitTooLongLine transformer inside Robotidy).

And IF without End is valid Robot Framework code but introduced in RF 4 (I guess). If you are developing (and formatting wth Robotidy) on more recent version than you are executing your tests it may lead to such issues. If your tests are failing with this syntax I would check what version you are using. But of course if you disable formatting it should not be the issue anyway.

Regards,
Bartłomiej Hirsz


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/a43b4a26-2bc9-445b-a004-4134c6f83f85n%40googlegroups.com.

Wentao Ma (Charis)

unread,
Aug 14, 2024, 9:42:09 AM8/14/24
to robotframework-users
Thank you , Hirsz. 

I know why now. I try to change the settings. I found " Robot: Code Formatter  1)builtinTidy (default)  2)robotidy " . I switch them from one to the other . It looks like the same.

I update my RF version and try to used to the formatter. ^@^ 

Regards, 
Wentao Ma
Reply all
Reply to author
Forward
0 new messages