Skip to content

Releases: MarketSquare/robotframework-tidy

1.6.2

14 Nov 13:51
f8ba51d

Choose a tag to compare

Fixes

  • AddMissingEnd transformer 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

11 Oct 16:45
f80010c

Choose a tag to compare

Minor fixes.

Fixes

  • Extra trailing whitespace when aligning multiline statements with blank lines will no longer be added #220
  • Task header should no longer be converted to test cases header #221
  • Fix keword -> keyword typo #222

Acknowledgements

Thanks @admorgan, @adrszad for reporting issues.

1.6.0

01 Oct 07:30
b0ea7f6

Choose a tag to compare

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 AlignTestCases transformer 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 AddMissingEnd transformer (#91)

  • NormalizeAssignments now 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=True parameter (#182)
  • Semicolon in parameter value can now be escaped with \: (#190)
  • Default separator can be changed from space to tabular with new --separator option (#184)

Fixes

  • Robotidy will not print "Loaded configuration from ... " if the configuration is empty (#193)
  • no source path provided error 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

16 Aug 08:29
d3006aa

Choose a tag to compare

Fix critical issue with pathspec dependency.

Fixes

  • Robotidy will now not crash on directory path #177

Acknowledgements

Thanks @sergii-tsymbal-exa for reporting the issue

1.5.0

16 Aug 05:51
a648d09

Choose a tag to compare

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 --exclude option, 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 --lineseparator option #163
  • Do not print empty line for file without changes with --diff option #160

Acknowledgements

Thanks @aaltat, @fdaguin, @emakaay for reported issues and ideas.

1.4.0

05 Jul 05:48
1ef2845

Choose a tag to compare

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

01 Jul 13:15
f212afd

Choose a tag to compare

This release includes some backward incompatible changes to transformers naming - read the release log for more details.

Transformers

  • AssignmentNormalizer was renamed to NormalizeAssignment for consistent naming with other transformers #115
  • It is now possible to select what sections are normalized in NormalizeSeparators transformer with sections param #116
  • OrderSettings now puts settings before comments and empty lines at the end of keyword/test case body #118, #125

Features

  • New option --output option for saving transformed file to provided path instead of overwriting source file #108
  • --desc now accepts all for printing out description of all transformers #105
  • Robotidy will now suggest similar names for invalid transformer names used with --transform or --desc options #107
  • --list now prints transformers in alphabetical order #141

Fixes

  • Renamed short version of --lineseparator to -ls to avoid collision with --list\-l
  • Description for disabled transformers can be now displayed & disabled transformers are in --list output #114
  • Robotidy should now correctly load configuration files from path when using --config #138
  • ReplaceRunKeywordIf will now set variable values to None if 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-transformer and --list-transformers aliases for --list and --desc
  • Added -h alias for --help command
  • 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

07 Jun 17:49
b1d5349

Choose a tag to compare

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 --spacecount option) #32
  • New RemoveEmptySettings transformer for removing empty settings such like Suite Setup or [Arguments]. Settings that are overwriting suite settings (like empty [Tags] overwriting Default 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 --startline and --endline options for aligning only part of *** Variables *** section #62
  • AlignVariablesSection now supports up_to_column parameter so it is possible to chose how much column are width aligned
  • AlignVariablesSection and AlignSettingsSection change up_to_column default value from 0 (meaning all columns) to 2 (only first two columns are width aligned, rest use fixed length)

Features

  • New option --configure or -c for configuring transformer parameters. It works the same way configuring through --transform works. The benefit of using --configure is that you can configure selected transformers and still run all transformers #96
  • Transformers can now be disabled by default if you add ENABLED = False class attribute to your class. Those transformers will be only run when selected explictly with --transform option #10
  • Support for pyproject.toml configuration files. Because of the required changes there are backward incompatible changes done to robotidy.toml syntax. See example from README #66
  • --list-transformers output is now ordered. Also transformers themselves will always run in the same predefined order #69
  • --describe-transformer output is now pre-formatted (removed rst formatting) #83
  • Several options have now abbreviations: #92
    • --transform can be also used with -t
    • --list-transformers can be also used with --list or -l
    • --describe-transformer can be also used with --desc or -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 --diff option 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.

1.1.1

05 Apr 13:09
c4dc936

Choose a tag to compare

Bugfix for AlignVariablesSection transformer

Fixes

  • AlignVariablesSection should ignore lines with only comments

1.1.0

05 Apr 12:48
3f9681f

Choose a tag to compare

This release includes:

New transformers

  • AlignVariablesSection for aligning variables and their values in column like appearance #50

Fixes

  • Robotidy should not add new (extra) line at the end of file #47
  • BuiltIn.Run Keyword If should now work with ReplaceRunKeywordIf transformer #53