- Notifications
You must be signed in to change notification settings - Fork16
Robot Framework code formatter
License
MarketSquare/robotframework-tidy
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Starting from Robocop 6.0, Robotidy is part of Robocop as formatter.
If you are new users, please usehttps://github.com/MarketSquare/robotframework-robocop instead.
Robotidy is a tool for autoformatting Robot Framework code.
It is spiritual descendant of Robot Framework's internal robot.tidy package.
Full documentation availablehere. 📖
Python 3.8+ 🐍 and Robot Framework 4.0.0+ 🤖.
You can install Robotidy simply by running:
pip install -U robotframework-tidyCall robotidy with path(s) to file/directory with robot files:
robotidy testsrobotidy test.robotrobotidy tests/resources test.robotAll command line options can be displayed in help message by executing:
robotidy --helpSeedocumentation for information how to configurerobotidy.
Ugly code before transforming with robotidy:
*** Settings ***Force Tags tags tag2Library CollectionsResource important.robotLibrary MyCustomLibrary.pyTest Setup Setup Keyword*** test case*Test1 [ teardown] Teardown Keyword Keyword FOR${var} IN RANGE 10 Run Keyword If${var}>5 Other Keyword END*** Variables ***${var}=2${bit_longer}10${var2} a... b*** Keywords ***
A lot prettier code after:
*** Settings ***Library CollectionsLibrary MyCustomLibrary.pyResource important.robotTest Setup Setup KeywordForce Tags tags tag2*** Variables ***${var}2${bit_longer}10${var2} a... b*** Test Cases ***Test1 Keyword FOR${var} IN RANGE 10 IF${var}>5 Other Keyword END END[Teardown] Teardown Keyword
About
Robot Framework code formatter
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
