-
Notifications
You must be signed in to change notification settings - Fork 62
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
Coloured output #203
Comments
CI usually does not have stdout be a TTY, so my proposal would default to no colours in that case |
@JSSAggie oasdiff automatically disables colored output when it detects piped output so you can easily remove the colors as follows: |
I still think the flag is valuable. We can pipe out to a json file in the meantime. |
Looks like that will do it. Thanks |
It's unclear to me if the I would find this helpful since in our CI we'd like to |
Hi @ls-jad-elkik, In preparation for a proper solution, could you clarify whether you expect artifacts/diff.txt to contain colors or not? |
Hi @reuvenharrison, We're going to be using the workaround. The idea was to maybe strip the color codes before storing the artifact, because along with colors the indentation is gone when tty detection kicks in. And indentation is also important to make it readable. I don't think it's a very critical feature, but it's kind of standard to either have that Thanks for the quick reply and clarification. |
We will add |
The latest release adds support for |
Ahh, I didn't specify which commands I would like to see coloured output in the original request. |
Hi @EpicWink, It would be useful to understand this and also the general use-case: how you use the diff output? By the way, you are welcome to join our slack community where we can discuss this privately: Thanks, |
I use the text-format diff, but I hadn't considered using changelog. I think that solves my use-case. I use it as an output in CI
Laurie
…________________________________
From: Reuven Harrison ***@***.***>
Sent: Friday, December 1, 2023 7:19:59 PM
To: Tufin/oasdiff ***@***.***>
Cc: Laurie O ***@***.***>; Mention ***@***.***>
Subject: Re: [Tufin/oasdiff] Coloured output (Issue #203)
Hi @EpicWink<https://github.com/EpicWink>,
Which format of the diff report are you using? json, text, html, or yaml?
The json and yaml formats provide a low-level diff report which is not ideal for human-readers.
The diff report in text or html formats is easier to read.
But the best report for humans is the changelog.
It would be useful to understand this and also the general use-case: how you use the diff output?
By the way, you are welcome to join our slack community where we can discuss this privately:
https://join.slack.com/t/oasdiff/shared_invite/zt-1wvo7wois-ttncNBmyjyRXqBzyg~P6oA
Thanks,
Reuven
—
Reply to this email directly, view it on GitHub<#203 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AF72GRNMAFLX5W6R4PJ5EKDYHGOL7AVCNFSM6AAAAAAWETX4T2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVG42DMOBWGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Problem
A little difficult to distinguish between context, added, deleted, and modified properties in monochromatic output.
Proposal
Add option to have coloured output:
Perhaps on by default (
-color auto
), with explicit enable/disable (disregard output not being a TTY for-color always
).Blue for context (endpoint method/paths, 'XXX changed'), red for deleted, orange/yellow for modified, and green for added.
Alternatives
Deal with no colours.
The text was updated successfully, but these errors were encountered: