-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: disable color #13
Comments
Hi @markand, thanks for opening this issue! 😄 I agree, that would be great! Although the way that I was hoping to implement that was through this feature described in the roadmap:
Where we'd basically have a choice of options like these (the actual labelling is not definitive):
Otherwise, if a color flag was implemented separately, it might work for some output formats but not others, which might not be ideal. Would that make sense? |
I don't think so, for example, the command line tool I think having an option that disable color should disable them if the output format support them. |
I feel like colorizing only makes sense when we want to log output onto a shell for users to consume in a human-friendly fashion, as a way to inform them of the result of running their unit tests. In contrast, XML, JSON, and other formats are mostly intended to be forwarded onto other commands for further processing rather than being directly consumed by users. In fact, colorizing such outputs would likely make them impossible to be parsed by these other commands. We should aim at keeping things relevant to the scope of this project and to keep things as simple as possible—Rexo is not a syntax colouring library for XML, JSON, and other formats. If such a feature is needed, I'm sure that there are other commands out there that are built for this specific purpose and that can be piped to the output of Rexo. However, if colorizing the output can help increasing readability of some non-standard output from Rexo that is intended to be consumed by the users, then sure! As a result, I personally dislike having flags that work only when some other flags have specific values set. I'd rather think of a design that doesn't need this sort of coupling, and that's why I would much prefer what I suggested in my previous comment. |
currently i did not see any colorisation on .devcontainer in vscode for both main and no-asan, so [PASSED] printed out normally. is it expected or just a glitch? i do not understand, thanks! |
Hi @default-writer! Rexo will colorize the output using ANSI escape codes (https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) if:
However, I don't know the specifics of .devcontainer / vscode, sorry 😅 |
I propose a runtime option to disable colors using
-c
.The text was updated successfully, but these errors were encountered: