This huge release introduces 7 new rules and fixes other. Robot Framework 4.1 🤖 is now supported. Some great features for developers ⌨️ like `tox` are also something new. It also improves the quality of the code 💻 and documentation 📄. Thanks to all the contributors for their work! 🤝 Take a look at the details below and have fun using Robocop! 👮🏻♂️
Remember to upgrade your Robocop with:
pip install -U robotframework-robocop
___
New rules
---------
- **E0314 (empty-library-alias)** checks if alias for library (after `WITH NAME`) is left empty: (185)
Library Collections WITH NAME
- **W0315 (duplicated-library-alias)** if alias for library is the same as the library original name: (185)
Library Collections WITH NAME Collections
- **W0527 (too-many-test-cases)** checks if the number of test cases does not exceed the configured number. (112)
This can be easily set by configuring the rule, e.g.:
`robocop -c too-many-test-cases:max_testcases:100 -c too-many-test-cases:max_templated_testcases:200 <path_to_tests>`
Defaults are:
- 50 test cases for a file (suite)
- 100 templated test cases for a file (suite)
- **I0912 (empty-variable)** detects variables without a value (294)
- **I0913 (can-be-resource-file)** suggests to change file extension to `.resource` if there are no tests defined inside (380)
- **I0316 (possible-variable-overwriting)** detects possible overwriting of variables that are visually similar but are totally the same as read by Robot Framework parser (120)
- **I0317 (hyphen-in-variable-name)** detects hyphens (`-`) in variable names when assigning values to prevent from accidental subtraction of values (271)
Features
---------
- Listing rules (with `--list` or `--list-configurables` options) now also displays a nice summary with amount of rules for each severity: (416)
(...)
Altogether 6 rule(s) with following severity:
1 error rule(s),
2 warning rule(s),
3 info rule(s).
- Added support for Robot Framework 4.1: (433)
- Support for new special tags (449)
- Support for this syntax `${var}['key']['key2']` (451)
Fixes
-----
- Fixed a lot of typos in code, output and documentation (418, 419)
- semicolon `:` is now allowed to use when configuring rule, e.g. `invalid-char-in-name` with configurable `invalid_chars` (428)
- Rule W1007 (uneven-indent) now properly parses indentation with templated test cases and comments (375)
- Rule W1003 (empty-lines-between-sections) now supports comments between sections (448)
- Rule W0301 (invalid-char-in-name) now doesn't break on embedded arguments (421)
- Rules W0701 (todo-in-comment) and W0702 (missing-space-after-comment) now accept more cases when using comments (447)
- Robocop disablers should now work properly (More info: 425)
Other
------
- Removed deprecation warnings for old rules that were renamed: (418)
- `setting-name-not-capitalized` -> `setting-name-not-in-title-case`,
- `not-capitalized-keyword-name` -> `wrong-case-in-keyword-name`,
- `missing-doc-testcase` -> `missing-doc-test-case`
- Some refactor improving readability of the code and its performance (418, 419)
- Bug template for GitHub issue is now improved (426)
- Block disablers can now be indented (431)
- Added `pyyaml` and `tox` to dev dependencies in setup.py
- With introduction of tox, when contributing to codebase, you can now quickly run all tests just by running `tox` command for both 3 and 4 versions of Robot Framework or you can choose specific one by typing `tox -e rf3` or `tox -e rf4`
Acknowledgements
---------------------
Thanks MoreFamed, haklir, adrszad for reporting bugs and features.
Thanks UliSei, matusaurio for contributing with comments and suggestions.