Features
-
Breaking change Add option
--extend-selectfor linter and formatter (issue #1546)--extend-selectallows to enable rules and formatters on top of theselectconfiguration. It can be used to
retain all default rules or formatters and only add additional ones:robocop check --extend-select no-embedded-keyword-arguments robocop format --extend-select AlignKeywordsSection --extend-select CustomFormatterSince previous
--custom-formattersformatter option already behaved like a--extend-selectoption (which was
not documented), it is now deprecated and renamed to--extend-selectinstead.It is also recommended to use
--extend-selectover--configue name.enabled=True. -
Breaking change Split
wrong-case-in-keyword-namerule into two separate rules (issue #1471):wrong-case-in-keyword-namewhich checks case convention in keyword definition name
wrong-case-in-keyword-callwhich checks case convention in keyword call nameIt allows configuring different conventions for keyword definition and keyword call names. If you have existing
configuration forwrong-case-in-keyword-name(you are ignoring it or configuring) you need to apply the same
config towrong-case-in-keyword-callto retain old behaviour. -
SplitTooLongLinecan now split more settings types: Library imports, Test Tags and Keyword Tags (issue #1454)Example code before and after the change:
Library CustomLibraryWithLongerNameAndSeveralArguments first_argument second_argument=${longer_variable_name} WITH NAME name
Library CustomLibraryWithLongerNameAndSeveralArguments ... first_argument ... second_argument=${longer_variable_name} ... WITH NAME name
-
Restore project checkers (issue #1108)
Project checkers were temporarily removed in the Robocop 6.0. There are now brought back in a new form, as a separate
command:robocop check-projectThis command behaves similarly to the
checkcommand, but it only runs project rules.The project checks itself were also refactored to be more flexible. See project checker
and custom rules project checker for reference. -
Extend robocop disablers to the whole node (issue #1515
Robocop will now ignore issues in the whole node (keyword, test case, for loop, keyword call, etc.) when the disabler
is set in the header / keyword call body. For example:*** Keywords *** My Keyword FOR ${var} IN 1 2 3 # robocop: off=unused-variable Log 1 END Keyword # robocop: off=bad-indent ... ${var} ... ${var2}
Previously, Robocop would ignore
unused-variableonly when reported on theFORheader andbad-indentonly
when reported on the same line as disabler comment. After this change, those issues will be ignored in the whole
FOR loop and the wholeKeywordcall respectively. -
Ignore unused variables starting with
_(${_variable}) (issue #1457
Fixes
- Fix
unused-variableandvariable-overwritten-before-usagerules not reporting violations inTRYblocks (issue #1548) - Fix
wrong-case-in-keyword-callrule false positive report on names with.character with first_word_capitalized = True (issue #1555) - Fix
wrong-case-in-keyword-namerule incorrectly handling names with.character (issue #1555)
Documentation
- Added documentation linters (with MegaLinter) and fixed several issues in our documentation.