Utility scripts for formatting Robot Framework code
Project description
Introduction
Requirements
Python 3.6+ and Robot Framework 3.2.1+.
Installation
You can install RobotClean simply by running:
pip install robotframework-clean
Usage
RobotClean support following modes (you can mix them):
splitting keyword(s)
robotclean –mode split –path test.robot –line 10 –end-line 10
It will split keyword(s) at given location. Example:
Keyword ${var} ${var2}
to:
Keyword ... ${var} ... ${var2}
renaming keyword(s)
robotclean –mode rename –path test.robot
It will rename keyword(s) at given location to follow Title Case. Example:
this_is_keyword This Is Keyword This is keyword And also ABBREV
to:
This Is Keyword This Is Keyword This Is Keyword And Also ABBREV
aligning to column(s)
robotclean –mode align –path test.robot –line 5 –end-line 10
It will align variables and keywords to column like appearance. Example:
${var} Keyword ${var1} 4 test ${var} test=${5} Longer Keyword ${var} ${value} Set Variable If ${value}==True 5
to:
${var} Keyword ${var1} 4 test ${var} test=${5} Longer Keyword ${var} ${value} Set Variable If ${value}==True 5
replacing tabs to spaces
robotclean –mode tabs_to_spaces –path test.robot
It will replace all tab character by spaces (while trying to preserve aligment)
adjusting whitespace
robotclean –mode whitespace –path test.robot
It will adjust whole robot file to set of rules: - no empty sections allowed - 2 empty lines between sections - 1 empty line between tests and keywords - 1 trailing line at the end of file - no trailing whitespace
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file robotframework-clean-1.2.0.tar.gz
.
File metadata
- Download URL: robotframework-clean-1.2.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4aff30f8c8040f2d2cc8d5ffcd2f2eab60147a228b9dbe240edf348687fb672 |
|
MD5 | cfe836b5953e46203fd0132e3c5896a5 |
|
BLAKE2b-256 | c14321a591fe6f3b13f040f85106c15830f2e50f6f83165de8f3bd95e7e6be48 |
Provenance
File details
Details for the file robotframework_clean-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: robotframework_clean-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7286fa277e1dc87e0d5dea784b26b91cd5d2cd4c8c58796606e25dbf4c79374f |
|
MD5 | bb7abf6eb32a39b8edb3ee92cc496426 |
|
BLAKE2b-256 | f8a202d15d46e4fe46b9e553094863db71b3b88d85e74318c01d0d745bd1ba9b |