MarketSquare / MarketSquare/robotframework-tidy
Option to output in colour when piped
Nobody has claimed this yet.
- Dominant language
- RobotFramework
- Stars
- 113
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently, when the output is piped (whether to an application or file), it seems as though `--color` is ignored. We have a script running in CI that runs robotidy, and captures the output. It would be nice if we could get it to work in colour.
For example, this is in colour:
```
robotidy --check --diff --color .
```
But this is not (replace `type` with `cat` if not using windows):
```
robotidy --check --diff --color . > output.txt
type output.txt
```
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 how `robotidy --check --diff --color .` decides whether output is being written to a terminal or redirected. Compare terminal output with the `output.txt` example; done means `--color` preserves colour when output is piped or captured, including the CI use case.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100