SmartSortKeywords¶
Sort keywords in *** Keywords ***
section.
Enabling the formatter
SmartSortKeywords is not included in default formatters, that’s why you need to call it with --select
explicitly:
robocop format --select SmartSortKeywords
Or configure enabled
parameter:
robocop format --configure SmartSortKeywords.enabled=True
By default sorting is case insensitive, but keywords with leading underscore go to the bottom. Other underscores are treated as spaces. Empty lines (or lack of them) between keywords are preserved.
*** Keywords ***
_my secrete keyword
Kw2
My Keyword
Kw1
my_another_cool_keyword
my another keyword
Kw3
*** Keywords ***
my_another_cool_keyword
my another keyword
Kw3
My Keyword
Kw1
_my secrete keyword
Kw2
Default behaviour could be changed using following parameters: case_insensitive
, ignore_leading_underscore
and ignore_other_underscore
.