This release is mostly a big refactoring with parts of the code not touched since the very first commits. Some defaults has changed, some documentation has been updated. We made couple of fixes also and deprecated rule W0906 that is now exchanged with two new ones: W0909 and W0910. README is now written in markdown and it has a new expandable FAQ section at the bottom. There is also a new verbose mode and pyproject.toml is now supported for tool configuration. These and many more are described in detail below. Enjoy! 👮🏻♂️
New rules
- W0909 (inconsistent-assignment) checks if all assignments in
*** Test Cases ***and*** Keywords ***sections are the same type #295 - W0910 (inconsistent-assignment-in-variables) checks if all assignments in
*** Variables ***section are the same type #295
Note: Possible values for W0909 and W0910 assignment_sign_type parameter are: none (without equal sign), equal_sign ('='), space_and_equal_sign (' ='), autodetect (detects the most common option and looks for inconsistencies in the code).
- W0705 (bom-encoding-in-file) checks if robot file uses not supported BOM (Byte Order Mark) encoding #327
- W0911 (wrong-import-order) checks if builtin libraries are imported before any other library #313
Deprecated rules
- W0906 (redundant-equal-sign) - with the addition of W0909 and W0910 the W0906 is being deprecated. You can get the old W0906 behavior with W0909 and W0910 if you configure their parameter
assignment_sign_typewith one of:equal_sign('='),none(''),space_and_equal_sign(' ='). W0906 will be deleted in next bigger release (1.8.0) or in the following (1.9.0) if it will be too early. #321
Fixes
- W1002 (missing-trailing-blank-line) will not report each time when used with LSP #307
- Misaligned variables in
*** Variables ***section should not cause fatal exception now #292 - Empty keyword names causing TypeError exception #318
- W0302 (not-capitalized-keyword-name) should have better support for local characters #314
- W0704 (ignored-data) now works with BOM encoded files #326
- Changed outdated data in documentation #335
- For loops and IFs inside test cases should be parsed by indent rules #331
- W1007 (uneven-indent) will now ignore comments between test cases and keywords #332
- Empty test case name will not throw IndexError from now #333
Other
- README has been rewritten to markdown and now includes nice FAQ section #335
- Video of our talk from RoboCon2021 is now included at the top of README file! #335
pyproject.tomlis now supported #301 See documentation for more info docs- Severity is not listed in every rule when using
--list-configurables, instead it's listed only once #304 --list-configurablesnow displays only rules that have configurable parameter #335- Prettified
--list-reportsoutput #335 severityparameter in other CLI options is now case-insensitive (both e/w/i and E/W/I are accepted) #335- Rule name is now included in default issue output #310
- Added
-vv / --verboseflag for more detailed output #72 #335 - Return status is now calculated on number of found issues that exceed quality gates limits #335
- Quality gates default values are now
{'E': 0, 'W': 0, 'I': -1}which means that any error or warning will make Robocop return non-zero status. -1 value means that issues with INFO severity will not affect return code. This can be configured by--configure return_status:quality_gate:E=<value>:W=<value>:I=<value#335 - Changed defaults for some lengths checkers: #335
testcase_max_calls: 8 → 10 (maximum amount of keyword calls inside test case)keyword_max_calls: 8 → 10 (maximum amount of keyword calls inside keyword)keyword_min_calls: 2 → 1 (minimum amount of keyword calls inside keyword)
--ext_rulesoption is now--ext-rulesoption (changed underscore_to hyphen-) #335- Some command line options received short flag argument: #335
-nrfor--no-recursive-lcfor--list-configurables-lrfor--list-reports-ftfor--filetypes-gfor--ignore