Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marketsquare/robotframework-tidy
Robot Framework code formatter
https://github.com/marketsquare/robotframework-tidy
codeformatter robotframework robotidy
Last synced: 5 days ago
JSON representation
Robot Framework code formatter
- Host: GitHub
- URL: https://github.com/marketsquare/robotframework-tidy
- Owner: MarketSquare
- License: apache-2.0
- Created: 2020-11-30T17:57:04.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-28T17:38:43.000Z (5 days ago)
- Last Synced: 2024-12-28T18:23:54.068Z (5 days ago)
- Topics: codeformatter, robotframework, robotidy
- Language: RobotFramework
- Homepage: https://robotidy.readthedocs.io/
- Size: 1.58 MB
- Stars: 108
- Watchers: 7
- Forks: 16
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
![Codecov](https://img.shields.io/codecov/c/github/MarketSquare/robotframework-tidy/main "Code coverage on master branch")
![PyPI](https://img.shields.io/pypi/v/robotframework-tidy?label=version "PyPI package version")
![Python versions](https://img.shields.io/pypi/pyversions/robotframework-tidy "Supported Python versions")
![Licence](https://img.shields.io/pypi/l/robotframework-tidy "PyPI - License")---
Robotidy
===============
- [Introduction](#introduction)
- [Documentation](#documentation)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Example](#example)Introduction
------------
Robotidy is a tool for autoformatting Robot Framework code.It is spiritual descendant of Robot Framework's internal robot.tidy package.
Documentation
-------------
Full documentation available [here](https://robotidy.readthedocs.io). :open_book:Python 3.8+ :snake: and Robot Framework 4.0.0+ :robot:.
You can install Robotidy simply by running:
```
pip install -U robotframework-tidy
```Usage
-----
Call robotidy with path(s) to file/directory with robot files:```
robotidy tests
robotidy test.robot
robotidy tests/resources test.robot
```
All command line options can be displayed in help message by executing:```
robotidy --help
```See [documentation](https://robotidy.readthedocs.io/en/latest/configuration/index.html) for information how to configure
robotidy.Example
-------
Ugly code before transforming with robotidy:
```robotframework
*** Settings ***
Force Tags tags tag2
Library Collections
Resource important.robot
Library 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:
```robotframework
*** Settings ***
Library Collections
Library MyCustomLibrary.py
Resource important.robotTest Setup Setup Keyword
Force 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```