Robotframework-robocop

Latest version: v5.8.1

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

Scan your dependencies

Page 8 of 11

1.11.0

Yet another big release in a row 🚀. This time around we bring you 14 new rules - and we finally reached over 100 rules! Most of them try to analyze possible syntax errors and hint you what you possibly did wrong - e.g. if you forgot to put at least 2 spaces after setting. We also included various fixes and improvements for issue reporting.

Unfortunately, there are backward-incompatible changes - `E0304`, `missing-whitespace-after-setting`, `variable-should-left-aligned` and `invalid-char-in-name` were renamed (details in the release notes).

BTW This week is **Robocop's first anniversary** 🎂! What a journey it was - nearly 500 issues on GitHub, 20 releases, over 100 implemented rules, over 340 tests and thousands lines of code. Let the Robocop's watch never ends 👮‍♂️!

New rules
---------
- **W0318 (bdd-without-keyword-call)** checks if BDD-reserved keyword was used (Given, When, And, Then, But) with no keyword following it (159)

Given throws warning
Given Some Keyword throws warning. Popular mistake - separating action keyword from BDD keyword
Given Some Keyword

- **E0811 (duplicated-argument-name)** for duplicated argument names. This type of error is silently ignored during execution but leads to unexpected results (401)

*** Keywords ***
Keyword
[Arguments] ${var} ${var}
Log ${var}

- **I0812 (duplicated-assigned-var-name)** looks for duplicated names of assigned variables (480)

${var} ${var} ${Var} My Keyword

- **E0404 (variables-import-with-args)** is reported when using variable imports with arguments when resource extension does not allow it (435)

*** Settings ***
Variables other.py arg1 it's fine
Variables variables.robot arg not allowed

- **W1015 (misaligned-continuation-row)** for alignment of multiline statements (438)

Keyword Call
... ${correct}
... ${incorrect}

- **E0412 (invalid-for-loop)** for invalid FOR loop syntax (445)
- **E0413 (invalid-if)** for invalid IF statement syntax (483 439)
- **E0405 (invalid-continuation-mark)** for invalid syntax of continuation line (``.. value`` or ``.... value``) (483 439)
- **E0407 (invalid-argument)** for invalid syntax of argument (for example ``[Arguments] 1`` string instead of variable name) (483 439)
- **E0408 (not-existing-setting)** when trying to use setting with not recognized name (``[Idontexist]``) (483 439)
- **E0409 (setting-not-supported)** when using setting not available in given type of body - for example ``[Arguments]`` in Test Case or ``[Template]`` in keyword) (483 439)
- **E0410 (not-enough-whitespace-after-variable)** for example ``${variable} 1`` (which will not be recognized as proper variable by Robot) instead of ``${variable}  1`` (483 439)
- **E0411 (not-enough-whitespace-after-suite-setting)** for example ``Library BuiltIn`` (not recognized by Robot) instead of ``Library  BuiltIn`` (463)
- **E1016 (suite-setting-should-be-left-aligned)** because settings are not recognized if they are not left aligned (462)

*** Settings ***
Library Collections


Backward-incompatible changes
-----------------------------------
- Renamed `E0304` rule id to `E0406` (name ``not-enough-whitespace-after-newline-marker`` did not change). Additionally, this rule catches a lot more instances of this issue
- Renamed `missing-whitespace-after-setting` to `not-enough-whitespace-after-setting`
- Renamed `variable-should-left-aligned` to `variable-should-be-left-aligned` (478)
- Rule `invalid-char-in-name` is renamed to `not-allowed-char-in-name`. It now accepts a regex pattern as value of configurable (which is renamed from `invalid_chars` to `pattern`) and it checks if the name of keyword/test case/suite complies with the regex. (466) Example of usage:

robocop -c not-allowed-char-in-name:pattern:[.?%] reports when one of `.`, `?` or `%` character is found in the name
robocop -c not-allowed-char-in-name:pattern:[^a-zA-Z] reports when there are characters different then provided in the regex (note the `^` that negates the match)


Fixes
------
- Rule **W0807 (duplicated-variables-import)** now correctly recognizes arguments passed to variable import (434)

*** Settings ***
Variables vars.py arg1
Variables vars.py arg2 it's not considered duplicate now

- Rule **W0301 (invalid-char-in-name)** now correctly ignores all type of variables in keyword name (including patterns in embedded vars) (457)
- Files using different encoding (such as Czech or Slovak language) should be now correctly parsed by Robocop (455)
- Variable definition with not enough whitespace after variable name will now be properly recognized and will not be reported as other issues (464)
- Not enough whitespace after new line mark (`...`) is now ignored by other rules such as duplicated-variable (460)
- All possible parsing errors should now be reported (461)
- ``Loaded configuration from`` will not be printed if the configuration is empty (446)

Other
------
- Rule **W0508 (line-too-long)** now ignores lines matching configured pattern. Default pattern is http(s) links (348)
It can be configured:
``robocop -c line-too-long:ignore_pattern:your\s+regex\s+pattern <path_to_tests>``
- Robocop now parses Robot Framework DataError instead of reporting it directly as parsing-error. It allows us to give more detailed information about errors (for example when missing whitespace after setting) (439)
- Revised and improved reported issue position (line and column) for all rules. Now it's consistent and also more precise for some of the issues (289)
- Changed how duplication rules are reported - instead of reporting on each duplicated line, it now reports on original (but it points to original in duplicated message) (482)
`Multiple keywords with name "Duplicated Keyword" (first occurrence in line 15)`
- Robocop source code is now formatted with [black](https://github.com/psf/black) (#485)

Acknowledgements
---------------------
Thanks MoreFamed for bug issues

1.10.0

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.

1.9.0

Small improvements to file configurations handling and other fixes. You can now also import external rules from Python packages/modules:

robocop --ext-rules pythonmodule


Features
---------
- External rules can be imported from external python packages. Read https://robocop.readthedocs.io/en/latest/external_rules.html for more details #404
- Comments are now supported in arguments files 406
- ``section-out-of-order`` rule can be now configured with custom order of sections 384

Fixes
-----
- Empty lines in argument files can be now used 405
- Fix issue with configuring severity of rule 402

Other
------
- ``toml`` module is now installed together with robocop for default support for ``pyproject.toml`` file

Acknowledgements
---------------------
Thanks for fdaguin and MoreFamed for reported issues and ideas

1.8.1

Release fixing issue with parsing configuration files.

Fixes
------
- Fix parsing option with values from config files 396

1.8.0

A lot of new rules and changes - with huge number of contributions from others! 🚀
Some of the rules change names - see next section for more details.

Rule names changes
------------------------
- Rename ``missing-doc-testcase`` to ``missing-doc-test-case``
- Rename ``not-capitalized-keyword-name`` to ``wrong-case-in-keyword-name``
- Rename ``setting-name-not-capitalized`` to ``setting-name-not-in-title-case``

Features
---------
- New rule for empty keyword or test case name (``E0312 keyword-name-is-empty`` and ``E0313 test-case-name-is-empty``) 337
- New rule ``W1012 consecutive-empty-lines`` checking for more than ``consecutive_empty_lines = 1`` empty lines 365
- New rule ``W1013 empty-lines-in-statement`` checking for empty lines inside multi line statement 371
- Tag rules now also parse tags defined in last line of documentation 194
- New rule ``E0403 missing-keyword-name`` for calling variables without keyword name 386
- New rule ``E1014 variable-should-left-aligned`` for ensuring that variables in variables section are left aligned 293

Fixes
-----
- Enforce utf-8 encoding when reading file for RawCheckers to fix problems with different encodings (such as inccorectly calculcated length of line) 356
- Fix invalid documentation regarding configuring format of the message 368
- ``W1004 empty-lines-between-test-cases`` should now ignore templated tests 367
- ``E0801 duplicated-test-case`` should now work correctly with normalized names 376
- Robocop will now not show ``W1003 empty-lines-between-sections`` after keyword section if the number of lines is correct 382
- ``format`` can be now used in ``.robocop`` configuraton file 387

Other
------
- When using invalid rule name Robocop will now throw exception listing close matches (if any) 358 361
- Allow to check only first word for capitalization in ``W0302`` (``wrong-case-in-keyword-name``) 359
- Documentation improvements 385

Acknowledgements
---------------------
Special thanks for:
- rauttiz for reporting issues with line length checker
- MoreFamed that provided enhancement idea for our error handling and idea for optional configuration for 0302 rule
- bollwyvl for including our license inside our package
- d-biehl that dicovered issues when parsing test cases and keywords without name and also reported & fixed 376
- rdagum that reported issue invalid documentation for rule name inside format option and suggested ignoring some of the issues when parsing code with templated tests
- kvo-harmoney for idea of rule checking for consecutive empty lines
- yo-ga for adding parsing tags from last line of documentation and implementing rule for checking if variables inside variables section are left aligned
- j3n5h for reporting & fixing issue with detecting number of empty lines after keyword section
- Calletje234 for reporting issue with configuring format of output message in config file

1.7.1

This is mostly a bugfix release with minor changes to configurables and a big refactor in documentation.

Fixes
-----
- Fixed typos and outdated parts in documentation, rephrased some parts 338
- Fixed typos in description of the rules 338
- Different line endings are now properly supported when using Robocop API 342
- Fixed issues with `line-too-long` (W0508) rule: 349
- Hidden characters do not count towards line length limit 345
- Tabulators are now properly counted 346
- Disablers in comment are excluded from line length limit 347

Other
-----
- Better and more concise display of configurable parameters (now they also have some description and show the default value) 338 350
- Removed 'checkers' section in documentation and moved some parts under 'rules' section 338

Acknowledgements
---------------------
Thanks d-biehl for resolving issue with line endings!

Page 8 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.