Skip to content

Commit bac0146

Browse files
authored
Release 4.10.0 (#648)
1 parent eb487b4 commit bac0146

File tree

9 files changed

+111
-69
lines changed

9 files changed

+111
-69
lines changed

docs/releasenotes/4.10.0.rst

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
:orphan:
2+
3+
===============
4+
Robotidy 4.10.0
5+
===============
6+
7+
This release brings new transformer - ``ReplaceWithVAR`` - that replaces different keywords for creating variable in
8+
test cases and keywords (such as ``Set Variable``, ``Set Variable If``, ``Catenate``..) with new Robot Framework 7.0
9+
``VAR`` syntax.
10+
11+
Additionally ``SplitTooLongLine`` was updated to support split too long ``VAR`` statements and several fixes were
12+
implemented.
13+
14+
You can install the latest available version by running
15+
16+
::
17+
18+
pip install --upgrade robotframework-tidy
19+
20+
or to install exactly this version
21+
22+
::
23+
24+
pip install robotframework-tidy==4.10.0
25+
26+
.. contents::
27+
:depth: 2
28+
:local:
29+
30+
31+
Transformers changes
32+
====================
33+
34+
New ReplaceWithVAR transformer (#625)
35+
-------------------------------------
36+
37+
New ``ReplaceWithVAR`` transformer that replaces ``Set Variable``, ``Create Dictionary``, ``Create List`` and
38+
``Catenate`` keywords with ``VAR``.
39+
40+
Read more about transformer at the
41+
`documentation page <https://robotidy.readthedocs.io/en/stable/transformers/ReplaceWithVAR.html>`_ .
42+
43+
Split too long VARs (#626)
44+
---------------------------
45+
46+
Too long ``VAR`` is now split with ``SplitTooLong`` transformer. Following code::
47+
48+
VAR ${long_variable_name_that_fills_up_half_of_available_space} long string value that overflows over available space
49+
50+
will be formatted to::
51+
52+
VAR ${long_variable_name_that_fills_up_half_of_available_space}
53+
... long string value that overflows over available space
54+
55+
Fixes
56+
=====
57+
58+
Improved error handling of file related issues (#629)
59+
-----------------------------------------------------
60+
61+
In case Robotidy failed to read or write to file, generic message with decode error was shown. Now it will display
62+
more detailed error message::
63+
64+
> robotidy read_only_file.robot
65+
Failed to decode read_only_file.robot with an error: Opening file 'read_only_file.robot' failed:
66+
PermissionError: [Errno 13] Permission denied: 'read_only_file.robot'
67+
Skipping file
68+
69+
0 files reformatted, 1 file left unchanged.
70+
71+
Variables in tags are no longer renamed with NormalizeTags (#638)
72+
-----------------------------------------------------------------
73+
74+
``NormalizeTags`` transformer incorrectly affected variables used in tags::
75+
76+
*** Settings ***
77+
Test Tags tag with ${var}
78+
79+
Such variables will be now ignored.
80+
81+
Gitignore patterns incorrectly matching paths (#632)
82+
----------------------------------------------------
83+
84+
Robotidy loads the ``.gitignore`` files to skip formatting ignored files and directories. There was a bug with how
85+
the paths are resolved which led to Robotidy ignoring too many paths. For example given project at
86+
``/tmp/a/b/c/d/my-project`` path, if ``.gitignore`` file contained ``tmp/`` pattern it matched whole project
87+
(``/tmp/a/b/c/d/my-project``) instead of path relative to project root (``/tmp/a/b/c/d/my-project/tmp/``).
88+
89+
Now Robotidy resolve paths correctly and such paths should be handled correctly.
90+
91+
Disablers not working for last setting in the Settings section (#639)
92+
---------------------------------------------------------------------
93+
94+
Robotidy disablers didn't work for the last setting in the ``*** Settings ***`` section. It was caused by
95+
``OrderSettingsSection`` which modified every last setting resetting node position. Following code should now work
96+
properly::
97+
98+
*** Settings ***
99+
Test Tags # robotidy: off
100+
... tag1
101+
... tag2
102+
103+
``load_transformers`` option not supported in the configuration file (#576)
104+
---------------------------------------------------------------------------
105+
106+
``--load-transformers`` (and ``load_transformers`` in the toml configuration file) was renamed before to
107+
``--custom-transformers`` (``custom_transformers``). Old name remained due to backward compatibility. However it was
108+
not handled properly and Robotidy cli only supported ``--load-transformers`` while configuration file only
109+
``custom_transformers``. Now the approach should be unified and both cli and configuration file should support old
110+
and new option name.

docs/releasenotes/unreleased/fixes.1.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/releasenotes/unreleased/fixes.2.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/releasenotes/unreleased/fixes.3.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/releasenotes/unreleased/fixes.4.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/releasenotes/unreleased/fixes.5.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.1.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.2.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

robotidy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.10.0a2"
1+
__version__ = "4.10.0"

0 commit comments

Comments
 (0)