Releases: MarketSquare/robotframework-tidy
1.6.2
Fixes
AddMissingEndtransformer now properly handles IFs without indented block of code (#226)- Paths passed from command line are now checked against excluded paths (previously it was only checked when iterating over directories) (#227)
Acknowledgements
Thanks @d-biehl for reporting issue and @DetachHead for reporting and implementing fix.
1.6.1
1.6.0
This release brings a lot of new transformers & changes! New long awaited AlignTestCases transformer (which for now is non default and for templated test only). There are also two new transformers contributed by @adrszad - OrderTags and NormalizeTags.
We also introduced new method of running non default parameter. By configuring enabled parameter you can run all default transformers with addition of selected non default ones:
robotidy --configure RenameTestCases:enabled=True <src>
See below changelog to read about other new transformers, features and fixes. You can also use our discussion page for any questions regarding this release or robotidy in general.
Transformers
-
New non default transformer
RenameTestCases. It capitalizes first letter of the test case name, removes trailing dot and can replace provided regex pattern with substitute string (#183) -
New non default transformer
RenameKeywords. It applies Title Case to keyword name and replace underscores by spaces and can replace provided regex pattern with substitute string (#183) -
Added
AlignTestCasestransformer for aligning templated test cases in column. Because it's in experimental mode it will be non default for now (see docs for information how to run it) (#185) -
Missing ENDs in for loop and if statements will be added by new
AddMissingEndtransformer (#91) -
NormalizeAssignmentsnow recognizes assignments from*** Variables ***section separately. It allows you to configure different assignment sign type for keyword calls and for variables section (#159)With this change following command will change all assignments signs to
=for keyword calls and remove them in*** Variables ***sections.robotidy -c NormalizeAssignments:equal_sign_type=equal_sign -c NormalizeAssignments:equal_sign_type_variables=remove <src> -
New
OrderTags(non default) transformer. It orders tags in lexicographic order (#205) -
New
NormalizeTags(non default) transformer. It normalizes tag name case and removes duplicates (#212)
Features
- It is now possible to provide source paths in configuration file (#154)
- Non default transformers can be enabled using
enabled=Trueparameter (#182) - Semicolon in parameter value can now be escaped with
\:(#190) - Default separator can be changed from space to tabular with new
--separatoroption (#184)
Fixes
- Robotidy will not print "Loaded configuration from ... " if the configuration is empty (#193)
no source path providederror now exits with code 1 instead of 0 (#208)
Other
- ReplaceRunKeywordIf now removes ELSE branch if it is unnecessary (#192)
Acknowledgements
Thanks @DetachHead for reporting issues regarding aligning test cases nad reporing & fixing #208, @liambeguin for PR with --separator option that allows to use tab as separator, @adrszad for all issues and adding two new transformers (OrderTags and NormalizeTags)
1.5.1
1.5.0
Robotidy will now ignore some paths such as .git - huge time gain for bigger or/and older projects. It will also ignore files from .gitignore. And --lineseparator finally works! Other fixes and improvements listed below:
Features
- Ignore paths from .gitignore and
--excludeoption, allow to ignore paths through using--extend-exclude#110 - Add extra indent for arguments in Suite Setup/Teardown, Test Setup/Teardown in AlignSettingsSection #155
- OrderSettingsSection will now preserve order of imports. It can be configured to work as before and other settings order can be also preserved #167
- When ordering imports with OrderSettingsSection, Remote library will not be grouped with other standard libs #175
- Allow to disable selected transformers #170
Fixes
- Do not count documentation length when aligning all columns in settings section #156
- Acknowledge
--lineseparatoroption #163 - Do not print empty line for file without changes with
--diffoption #160
Acknowledgements
Thanks @aaltat, @fdaguin, @emakaay for reported issues and ideas.
1.4.0
Improvements and fixes to pyproject.toml configuration file handling.
Fixes
- Invalid option names in pyproject.toml file will now stop Robotidy (with optional hint message) #150
Features
- Allow to use spaces in pyproject.toml configuration file #148
Other
- Fixed spelling issues in source code and docs #146
Acknowledgements
Thanks @adrszad for fixing our spelling issues
1.3.0
This release includes some backward incompatible changes to transformers naming - read the release log for more details.
Transformers
AssignmentNormalizerwas renamed toNormalizeAssignmentfor consistent naming with other transformers #115- It is now possible to select what sections are normalized in
NormalizeSeparatorstransformer withsectionsparam #116 OrderSettingsnow puts settings before comments and empty lines at the end of keyword/test case body #118, #125
Features
- New option
--outputoption for saving transformed file to provided path instead of overwriting source file #108 --descnow acceptsallfor printing out description of all transformers #105- Robotidy will now suggest similar names for invalid transformer names used with
--transformor--descoptions #107 --listnow prints transformers in alphabetical order #141
Fixes
- Renamed short version of
--lineseparatorto-lsto avoid collision with--list\-l - Description for disabled transformers can be now displayed & disabled transformers are in
--listoutput #114 - Robotidy should now correctly load configuration files from path when using
--config#138 - ReplaceRunKeywordIf will now set variable values to
Noneif there is no ELSE branch #140 - Transformers should always use the same order. If you need to use custom order, provide --force-order flag #142
Other
- Removed
'--describe-transformerand--list-transformersaliases for--listand--desc - Added
-halias for--helpcommand - Warn user instead of doing nothing when invoking robotidy without any arguments #106
Acknowledgements
Thanks @adrszad, @mnojek, @dcrblack and @kstine for ideas, reported issues and comments.
1.2.0
Huge update to Robotidy - several new transformers and features.
Transformers
- New AlignSettingsSection for aligning
*** Settings ***section into columns #60 - New NormalizeSeparators for normalizing all separators and indents to fixed length (according to global
--spacecountoption) #32 - New RemoveEmptySettings transformer for removing empty settings such like
Suite Setupor[Arguments]. Settings that are overwriting suite settings (like empty[Tags]overwritingDefault Tags) are preserved. See the docs for config options #78 - New SmartSortKeywords transformer (disabled by default) for sorting out keywords inside
*** Keywords ***section #52 - New MergeAndOrderSections transformer for merging duplicated sections and ordering them (order is configurable) #70
- New OrderSettings transformer for ordering settings like [Arguments], [Setup], [Return] inside Keywords and Test Cases #59
- New OrderSettingsSection transformer for ordering settings, imports inside
*** Settings ****section #100 - AlignVariablesSection now supports
--startlineand--endlineoptions for aligning only part of*** Variables ***section #62 - AlignVariablesSection now supports
up_to_columnparameter so it is possible to chose how much column are width aligned - AlignVariablesSection and AlignSettingsSection change
up_to_columndefault value from 0 (meaning all columns) to 2 (only first two columns are width aligned, rest use fixed length)
Features
- New option
--configureor-cfor configuring transformer parameters. It works the same way configuring through--transformworks. The benefit of using--configureis that you can configure selected transformers and still run all transformers #96 - Transformers can now be disabled by default if you add
ENABLED = Falseclass attribute to your class. Those transformers will be only run when selected explictly with--transformoption #10 - Support for
pyproject.tomlconfiguration files. Because of the required changes there are backward incompatible changes done torobotidy.tomlsyntax. See example from README #66 --list-transformersoutput is now ordered. Also transformers themselves will always run in the same predefined order #69--describe-transformeroutput is now pre-formatted (removed rst formatting) #83- Several options have now abbreviations: #92
--transformcan be also used with-t--list-transformerscan be also used with--listor-l--describe-transformercan be also used with--descor-d
Fixes
- SplitTooLongLine will now parse multiple assignment values correctly #68
- AlignSettingsSection is now parsing empty lines in multi lines correctly (those lines are removed) #75
- Fix
--diffoption not displaying colours on Windows #86 - Fix issue where variable was not left aligned if name was prefixed with space (
{variable} 4) #88
Other
- Support for pipes is now removed. All pipes will be converted to spaces by NormalizeSeparators transformer. It can be restored if people that use pipe syntax request for it
- Files with invalid encoding will now not stop robotidy execution - warning will be printed instead
- Created robotidy API to enable external python tools to use robotidy (such as RF LSP project)
Acknowledgements
Thanks @JaPyR for new SmartSortKeywords transformer and @adrszad for ideas and comments.