github MarketSquare/robotframework-robocop 2.4.0
Robocop 2.4.0

latest releases: v8.2.4, v8.2.3, v8.2.2...
3 years ago

Several improvements and fixes for Robocop reports & first updates for upcoming Robot Framework 5.1 release. Rule severity can be also be dynamic depending on the rule other parameters.

Reports improvements & fixes

  • Not all reports will be generated when using --reports all option. Some reports were internal only or produced files which may be not desired. Reports that are not enabled by all and only with specific mention (ie --reports sarif) are marked in our docs (reports docs) (#662)
  • It is possible now to change order of the reports in the output using --reports option. Before this release reports were generated in order they are implemented in Robocop code. Now if typu configure --reports x,y then first report x and then report y will be generated. You can also combine it with all if you only want one report at the top and rest in default order: --reports x,all (#664)
  • Invalid report name will now fail and suggest alternative if you made a typo - previously invalid report name was silenty ignored. For example it was possible to configure --reports timestamps (instead of timestamp) and user was not aware of it (#665)

Sarif report

Robocop can now generate report in sarif format. This format is accepted by various CI platforms as result of code scanning and can be used to integrate into Github CI (more details in our docs) (#638)

Configurable rule severity

It is now possible to configure rule to report with different rule severity depending if the rule exceed given thresholds (#614).
For example if you want line-too-long rule to issue warning on lines above 120 characters long and error on lines longer than 200 character you can configure it using severity_threshold:

robocop -c line-too-long:line_length=120 -c line-too-long:severity_threshold:warning=120:error=200

More on the feature in our docs.

too-few-calls-in-test-case rule

New rule too-few-calls-in-test-case. If the test case have less that allowed number of keyword calls (1 by default) it will report an error.

Other

  • Replaced toml with tomli library (for parsing our configuration files). tomli library was selected to be part of Python vendored-in libraries in future Python release (#609)
  • Handle new reserved tags in Robot Framework 5.1 (#660)
  • You can ignore documentation in too-long-test-case and too-long-keyword rules with new ignore_docs parameter (False by default) (#613)
  • Relative paths in the pyproject.toml configuration file are now resolved using configuration file parent directory as parent (and not using tool current working directory which lead to unexpected behaviour) (#612)

Acknowledgements

Big thanks to @ds-dustenharrison, @bollwyvl, @adrszad, @ZephyrusMB, @phermann-DGL, @rikerfi for raising the issues and providing the feedback.

Don't miss a new robotframework-robocop release

NewReleases is sending notifications on new releases.