Skip to content

Commit

Permalink
Release 4.10.0 (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhirsz authored Feb 28, 2024
1 parent eb487b4 commit bac0146
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 69 deletions.
110 changes: 110 additions & 0 deletions docs/releasenotes/4.10.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
:orphan:

===============
Robotidy 4.10.0
===============

This release brings new transformer - ``ReplaceWithVAR`` - that replaces different keywords for creating variable in
test cases and keywords (such as ``Set Variable``, ``Set Variable If``, ``Catenate``..) with new Robot Framework 7.0
``VAR`` syntax.

Additionally ``SplitTooLongLine`` was updated to support split too long ``VAR`` statements and several fixes were
implemented.

You can install the latest available version by running

::

pip install --upgrade robotframework-tidy

or to install exactly this version

::

pip install robotframework-tidy==4.10.0

.. contents::
:depth: 2
:local:


Transformers changes
====================

New ReplaceWithVAR transformer (#625)
-------------------------------------

New ``ReplaceWithVAR`` transformer that replaces ``Set Variable``, ``Create Dictionary``, ``Create List`` and
``Catenate`` keywords with ``VAR``.

Read more about transformer at the
`documentation page <https://robotidy.readthedocs.io/en/stable/transformers/ReplaceWithVAR.html>`_ .

Split too long VARs (#626)
---------------------------

Too long ``VAR`` is now split with ``SplitTooLong`` transformer. Following code::

VAR ${long_variable_name_that_fills_up_half_of_available_space} long string value that overflows over available space

will be formatted to::

VAR ${long_variable_name_that_fills_up_half_of_available_space}
... long string value that overflows over available space

Fixes
=====

Improved error handling of file related issues (#629)
-----------------------------------------------------

In case Robotidy failed to read or write to file, generic message with decode error was shown. Now it will display
more detailed error message::

> robotidy read_only_file.robot
Failed to decode read_only_file.robot with an error: Opening file 'read_only_file.robot' failed:
PermissionError: [Errno 13] Permission denied: 'read_only_file.robot'
Skipping file

0 files reformatted, 1 file left unchanged.

Variables in tags are no longer renamed with NormalizeTags (#638)
-----------------------------------------------------------------

``NormalizeTags`` transformer incorrectly affected variables used in tags::

*** Settings ***
Test Tags tag with ${var}

Such variables will be now ignored.

Gitignore patterns incorrectly matching paths (#632)
----------------------------------------------------

Robotidy loads the ``.gitignore`` files to skip formatting ignored files and directories. There was a bug with how
the paths are resolved which led to Robotidy ignoring too many paths. For example given project at
``/tmp/a/b/c/d/my-project`` path, if ``.gitignore`` file contained ``tmp/`` pattern it matched whole project
(``/tmp/a/b/c/d/my-project``) instead of path relative to project root (``/tmp/a/b/c/d/my-project/tmp/``).

Now Robotidy resolve paths correctly and such paths should be handled correctly.

Disablers not working for last setting in the Settings section (#639)
---------------------------------------------------------------------

Robotidy disablers didn't work for the last setting in the ``*** Settings ***`` section. It was caused by
``OrderSettingsSection`` which modified every last setting resetting node position. Following code should now work
properly::

*** Settings ***
Test Tags # robotidy: off
... tag1
... tag2

``load_transformers`` option not supported in the configuration file (#576)
---------------------------------------------------------------------------

``--load-transformers`` (and ``load_transformers`` in the toml configuration file) was renamed before to
``--custom-transformers`` (``custom_transformers``). Old name remained due to backward compatibility. However it was
not handled properly and Robotidy cli only supported ``--load-transformers`` while configuration file only
``custom_transformers``. Now the approach should be unified and both cli and configuration file should support old
and new option name.
12 changes: 0 additions & 12 deletions docs/releasenotes/unreleased/fixes.1.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/releasenotes/unreleased/fixes.2.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/releasenotes/unreleased/fixes.3.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/releasenotes/unreleased/fixes.4.rst

This file was deleted.

8 changes: 0 additions & 8 deletions docs/releasenotes/unreleased/fixes.5.rst

This file was deleted.

8 changes: 0 additions & 8 deletions docs/releasenotes/unreleased/transformers.1.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/releasenotes/unreleased/transformers.2.rst

This file was deleted.

2 changes: 1 addition & 1 deletion robotidy/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.10.0a2"
__version__ = "4.10.0"

0 comments on commit bac0146

Please sign in to comment.