Robotframework-robocop

Latest version: v5.8.1

Safety actively analyzes 715081 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 11

1.7.0

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](https://en.wikipedia.org/wiki/Byte_order_mark) (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_type` with 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.toml`` is now supported 301 See documentation for more info [docs](https://robocop.readthedocs.io/en/latest/user_guide.html#loading-configuration-from-file)
- Severity is not listed in every rule when using `--list-configurables`, instead it's listed only once 304
- `--list-configurables` now displays only rules that have configurable parameter 335
- Prettified `--list-reports` output 335
- `severity` parameter 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 / --verbose`` flag 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_rules` option is now `--ext-rules` option (changed underscore `_` to hyphen `-`) 335
- Some command line options received short flag argument: 335
- `-nr` for `--no-recursive`
- `-lc` for `--list-configurables`
- `-lr` for `--list-reports`
- `-ft` for `--filetypes`
- `-g` for `--ignore`

Acknowledgements
----------------------
- Thanks d-biehl for fixing 333 and 318 - you're true hero!🦸‍♂️

1.6.1

Pack of fixes.

Fixes
------------
- file_stats will acknowledge issues excluded by configuration 299
- W1007 (uneven-indent) should not report comments as rule volations 296
- W1007 (uneven-indent) should parse IFs 297
- Robocop API should load configuration file 302
- If there is invalid configuration while using Robocop API, it will throw InvalidArgumentError instead of SystemExit 303

1.6.0

This release introduce initial support for integration with LSP. It makes possible to integrate Robocop with IDEs like Intellij and should enable us to add Robocop to other tools or plugins.

New rules
-----------
- W1011 (misaligned-continuation) checks if continuation marks ``...`` are aligned with starting row 285

Fixes
------------
- W1007 (uneven-indent) should now work better with pipe style 284

Other
-----
- Extended our API for easier integration with other tools 168

1.5

The release includes support for Robot Framework 5.0 but the most important thing is that any
custom user-created rules are **not** compatible with this version and need to be migrated (more about that below).
Moreover, we improved our documentation with the examples for nearly every rule and the layout of the documentation
also changed to a better one! There are 8 new rules, some others are improved, few fixes, performance enhancements
and better exception handling. Please read the complete release notes to familiarize with what Robocop 2.0 has now
to offer.

We would also like to apologize that some bugs waited so long to be fixed. Our plan for the next release is to fix
all bugs that are left in the backlog and add any missing support for RF 5.0. Next, we want to focus on any other
features that we want Robocop to have.

- [Backward-incompatible changes](incompatible_changes)
- [Rules](rules)
- [Fixes](fixes)
- [Other](other)
- [Acknowledgements](acknowledgements)

Backward-incompatible changes <a name="incompatible_changes"></a>
-----------------------------
- The **rules are now defined as class (instead of a tuple)**. (516)
This makes the code a lot more readable and creation of new rules is a lot easier but... is also causes all
external rules created by the users not being compatible with RoboCop 2.0. They need to be migrated, so we
recommend reading the
["External Rules"](https://robocop.readthedocs.io/en/stable/external_rules.html) chapter from our documentation to
better understand how it works now. All built-in rules in Robocop are already migrated, but if you have some custom
ones, you need to migrate them by yourself. In case of any questions or issues, ping as on our
[robocop-linter](https://robotframework.slack.com/archives/C01AWSNKC2H) Slack channel.
- Rule **W0603 (tag-with-reserved)** name has changed to `tag-with-reserved-word` (573)
- Rule **E0902 (keyword-after-return-from)** has been removed and replaced with **W0901 (keyword-after-return)** (576)

Rules <a name="rules"></a>
-----
- *NEW*: **W0609 (duplicated-tags)** notifies if the same tag was used several times (542, 291)
- *NEW*: **I0914 (if-can-be-merged)** suggests merging several IF conditions into one, if they have identical
conditions (543, 441)
- *NEW*: **E0915 (statement-outside-loop)** checks if keywords like `Exit For Loop (If)`, `Continue For
Loop (If)` or statements like `BREAK`, `CONTINUE` are used only inside the loop (562, 477, 577)
- *NEW*: **W0608 (empty-tags)** detects `[Tags]` setting in keywords and test cases that has no values (508, 440)
- *NEW*: **W0813 (duplicated-setting)** warns user about duplicated setting (e.g. `Force Tags`) (572)
- *NEW*: **W0319 (deprecated-statement)** reports when deprecated keyword is used depending on the RF version in use
(565, 560, 576)
- *NEW*: **E0414 (return-in-test-case)** detects RETURN statements used outside the keywords (576)
- *NEW*: **I0916 (inline-if-can-be-used)** suggests whether to replace simple IF with new inline IF (578, 546)
- *UPDATE*: **E0303 (keyword-name-is-reserved-word)** supports detecting reserved names introduced in RF 5.0 (570, 568)
- *UPDATE*: **E0401 (parsing-error)** now also detects if positional argument is passed after named argument (541, 474)
- *UPDATE*: **E0412 (invalid-for-loop)** now better detects any syntax errors in FOR loop (572)
- *UPDATE*: **W0603 (tag-with-reserved-word)** is extended with another special tags with `robot:` prefix (573, 559)
- *UPDATE*: **W0901 (keyword-after-return)** replaces removed rule **E0902 (keyword-after-return-from)** (576)
- *REMOVED*: **E0902 (keyword-after-return-from)** (576)

Fixes <a name="fixes"></a>
-----
- Robocop now properly parses keywords that are preceded with a library name (e.g. `BuiltIn.Run Keyword If`) (519)
- Some rules now better point to the place where the issue occurred
- Many rules have more precise message (533)
- Using Gherkin syntax (given, When, Then, And) now doesn't throw an exception (549, 550)

Other <a name="other"></a>
-----
- The documentation has been significantly improved with a lot of good practices with real-life
examples about which code violates specific rule and why (527, 468, 555)
- (related to previous one) `Rule` class now accepts `docs` argument which is dedicated for providing the extended
documentation for specific rule (528)
- (related to previous one) Jinja templating is now supported in rules' documentation, which means that instead of
mystical rule message like `"Section name should be in format '%s' or '%s'"`, it can now be defined as
`"Section name should be in format '{capitalized}' or '{uppercase}'"` (534, 535)
- Robocop now skips reading paths defined in `.gitignore` file (531, 476)
- Exceptions handling has been significantly improved. Now all known issues or possible to catch errors should have
much better descriptions and additional warning messages. Only unexpected issues now display stacktrace (521, 530)
- Some rules that are available only in a specific version of Robot Framework will be properly marked when calling
`robocop --list` (enabled/disabled) (532, 507)
- New CLI argument `-gd/--ignore-default` now supports excluding directories and files (and it already has some nice
default list of ignored paths) (540, 475)
- Robocop is now faster since it excludes some files and directories from parsing phase. Depending on the repository
size, the execution time can be reduced up to 20% (540, 475)
- The documentation theme has been changed to "furo" - more readable one which includes better navigation and supports
dropdowns (567, 563)
- ``version`` attribute can now be specified for each rule to define which Robot Framework version enables it (545, 544)
- Support for Robot Framework 5.0 including:
- `IF`, `ELSE` & `ELSE IF` conditions support (551)
- Updated rule W0603 (more info in [Rules](rules) section above) (559)
- Updated many tests to cover support for RF 5.0 syntax (574)
- New rule W0319 (more info in [Rules](rules) section above) (565)
- New rule I0916 (more info in [Rules](rules) section above) (546)
- Added performance tests that create JSON report with test results which later can be compared with previous
results. They can be run with `pytest --benchmark-enable tests`. See
[here](https://pytest-benchmark.readthedocs.io/en/latest/index.html) for more details. (#495, 467)
- Configuration file is now always loaded first by default and any CLI arguments append to it (512)
- General code refactor, updated links in documentation, improved comments and print messages (577)
- Added Python 3.10 support (577)
- Removed deprecation warnings for the rules updated in the previous releases:
- `"missing-whitespace-after-setting"` which is now `"not-enough-whitespace-after-setting"`,
- `"variable-should-left-aligned"` which is now `"variable-should-be-left-aligned"`,
- `"0304"` which is now `"0406"`,
- `"invalid-char-in-name"` which is now `"not-allowed-char-in-name"`.

Acknowledgements <a name="acknowledgements"></a>
----------------
Thanks to our community for staying with us this whole time and for contribution to make Robocop even better!
Special thanks to users that helped with this release:
- MoreFamed for suggestion to improve messages of some rules (500)
- d-biehl for reporting a bug about Gherkin being not fully supported by Robocop (549)
- bithium for creating PR that improved how configuration is loaded (512)
- MalikMlitat for adding new W0319 rule that detects deprecated keywords (565)

And I (mnojek) would like to dedicate a huge thank you to bhirsz who is constantly working on making the tool
better. You are awesome! :tada:

1.5.0

This release brings few small improvements and fixes critical issues that occur when using Robot Framework 4.0.

New rules
-----------
- E0311 (else-not-upper-case) checks if ELSE and ELSE IF branches in IF block are upper case 278

Fixes
------------
- W1006 (mixed-tabs-and-spaces) should be able to report more than one rule violation per run 274
- W1007 (uneven-indent) should now support IF blocks 274
- E0303 (keyword-name-is-reserved-word) will not throw exception when there is only comment in the line 274

Other
-----
- New report `file_stats` can display overall statistics about number of processed files 262
- You can now use ` noqa` as alternative to ` robocop: disable` 269
- 10% performance improvement thanks to 129

1.4.1

Fixes
-----
- W1002 (missing-trailing-blank-line) - Fix rule and add tests to increase coverage (270)

Page 9 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.