Skip to content

Releases: MarketSquare/robotframework-tidy

1.5.0

16 Aug 05:51
a648d09
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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

1.0.0

16 Mar 07:56
a45cfdd
Compare
Choose a tag to compare

Our first (official) release! From this release Robotidy is full fledged tool for formatting Robot Framework code. At this time our transformers are:

Transformers

  • DiscardEmptySections - empty sections are removed
  • SplitTooLongLine - keywords with too long lines are splitted
  • NormalizeSettingName - ensure that setting names are Title Case - Test Template, Library
  • AssignmentNormalizer - use only one type of assignment
  • NormalizeNewLines - ensure proper number of empty lines between keywords, test cases and sections
  • NormalizeSectionHeaderName - ensure that sections are in *** Section *** or *** SECTION *** format
  • ReplaceRunKeywordIf - replace RunKeywordIf with IF blocks

While it's our first release we're supporting wide range of features:

Features

  • configurable transformers
  • selectable transformers (chose how you want to transform your code)
  • robotidy configuration can be supplied from cli and config file (which can be pointed to or autodetected in directory if the name is 'robotidy.toml'
  • option --no-overview to disable writing to files
  • option --diff to display file diff with the changes done by robotidy
  • option --check to return status depending on if any file was modified by robotidy
  • options --spacecount and --lineseparator for defining global formatting rules
  • --startline and --endline arguments for narrowing down what robotidy is supposed to transform in file
  • --list-transformers and --describe-transformer for displaying information about existing transformers

Don't hesitate to try it and in case of problems or new ideas feel free to create new issue in github.