robotidy Migration example is invalid

16 views
Skip to first unread message

Geist Eng

unread,
Jul 29, 2022, 5:40:48 PMJul 29
to robotframework-users
A copy of the example of a configuration in section 'Migrating from robot.tidy' on configuring-transformers page gives errors due to invalid syntax in two places.

  1 [tool.robotidy]
  2 configure = [
  3     "MergeAndOrderSections: order = settings,variables,testcases,keywords,comments",
  4     "OrderSettings: keyword_before = arguments,documentation,tags,timeout",
  5     "OrderSettingsSection: new_lines_between_groups = 0",
  6     "AlignSettingsSection: min_width = 18"
  7     "AlignVariablesSection": min_width = 18"
  8 ]

  • First missing a comma at end of line 6 so the error is:
    • Unclosed array (at line 7, column 5)
  • Second syntax error is on line 7 with the extra double quote at the end of AlignVariablesSection
    • After adding comma to line 6  the error from the double quote is:
    • Unclosed array (at line 7, column 28)
Corrected example:

[tool.robotidy]
configure = [
    "MergeAndOrderSections: order = settings,variables,testcases,keywords,comments",
    "OrderSettings: keyword_before = arguments,documentation,tags,timeout",
    "OrderSettingsSection: new_lines_between_groups = 0",
    "AlignSettingsSection: min_width = 18",
    "AlignVariablesSection: min_width = 18"
]





Geist Eng

unread,
Jul 29, 2022, 8:35:03 PMJul 29
to robotframework-users

The example for multiple parameters can be configured in one line or multiple lines is also missing a common on the first line of configure list.


Geist Eng

unread,
Jul 30, 2022, 7:33:18 PMJul 30
to robotframework-users
Robotidy owner has picked this up as  bug 367 in gitlab. 

Bartłomiej Hirsz

unread,
Aug 1, 2022, 5:01:31 AMAug 1
to robotframework-users
Thanks for reporting it! I have created an issue (https://github.com/MarketSquare/robotframework-tidy/issues/367) though it should be quick to fix :) 
Reply all
Reply to author
Forward
0 new messages