MarketSquare / MarketSquare/robotframework-tidy
Add support for pipes as separator
Nobody has claimed this yet.
- Dominant language
- RobotFramework
- Stars
- 113
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently --separator option only supports space and tab.
It would be great if you could add pipe separator support.
I also agree, from other bug discussion, with overall methodology when dealing with anything other than a space separator: first normalize to space separator, run all desired transforms, than normalize back to what ever separator desired.
I would like to ask for this support to also support a specialized style of pipes. I use pipes for readablility in the code -- but removed them for docs of code -- and to help prevent lack of separator bugs.
To increase readability in the code I ONLY use pipes on the keyword and test case step rows. Pipes are not used on table names: Settings, Keywords, etc., nor are pipes used on Keyword and Test Case name row. Note I do not use the newer feature where KW name row can have other text. Been RF'ing since 2015 ;-). If robotidy sees KW or TC name lines with text and the specialized format was requested it could error out or ignore specialized format and put pipes in where required.
Style as from the RF user doc:
```
| *** Settings *** |
| Documentation | Example using the pipe separated format.
| Library | OperatingSystem
| *** Variables *** |
| ${MESSAGE} | Hello, world!
| *** Test Cases *** | | |
| My Test | [Documentation] | Example test. |
| | Log | ${MESSAGE} |
| | My Keyword | ${CURDIR} |
| Another Test | Should Be Equal | ${MESSAGE} | Hello, world!
| *** Keywords *** | | |
| My Keyword | [Arguments] | ${path} |
| | Directory Should Exist | ${path} |
```
My current style which is supported by the RF parser:
```
*** Settings ***
| Documentation | Example using the pipe separated format.
| Library | OperatingSystem
*** Variables ***
| ${MESSAGE} | Hello, world!
*** Test Cases ***
My Test
| | [Documentation] | Example test. |
| | Log | ${MESSAGE} |
| | My Keyword | ${CURDIR} |
Another Test
| | Should Be Equal | ${MESSAGE} | Hello, world!
*** Keywords ***
My Keyword
| | [Arguments] | ${path} |
| | Directory Should Exist | ${path} |
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing --separator option and the Robot Framework formatting behavior described in the examples. Define how pipe separators and the specialized keyword/test-case style should handle names, tables, and unsupported text. Done means pipe-separated input is supported with the requested normalization behavior and the specialized style has a defined error or fallback path.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100