[PATCH] D41720: [clang-tidy] Add a -show-color flag.

2019-02-21 Thread Jan Niklas Hasse via Phabricator via cfe-commits
jhasse added a comment.

What are you thoughts about using an environment variable for this? Due to the 
number of differently named flags, it's often hard to configure a CI system to 
display color in every tool. (I'm trying to push for a standard for this, see 
https://bixense.com/clicolors/)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D41720/new/

https://reviews.llvm.org/D41720



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D152285: Add support for the NO_COLOR environment variable

2023-06-07 Thread Jan Niklas Hasse via Phabricator via cfe-commits
jhasse added a comment.

There's a valid usecase `CLICOLOR_FORCE`: Force color diagnostics. The "disable 
colors" part of https://bixense.com/clicolors/ is not that important to me, I 
could change it to point to `NO_COLOR` instead?

btw: I've tried to join the "standards" a few years ago: 
https://github.com/jcs/no_color/issues/28

Right now I think it would be best to drop `CLICOLOR` and have the following 
simple rules:

- if `NO_COLOR` set: disable colors
- if `CLICOLOR_FORCE` set: always set colors
- else: isatty

What do you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152285/new/

https://reviews.llvm.org/D152285

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D152285: Add support for the NO_COLOR environment variable

2023-06-07 Thread Jan Niklas Hasse via Phabricator via cfe-commits
jhasse added a comment.

In D152285#4403031 , @aaron.ballman 
wrote:

> In D152285#4401348 , @MaskRay wrote:
>
>> If we don't intend to support both standards, we can close 
>> https://github.com/llvm/llvm-project/issues/23983 (CLICOLOR) as a wontfix :)
>
> That was my plan.

As that issue was more about adding a way to force colors and not about 
disabling them, please leave it open.

> [...] I don't know what compelling use case there is for forcing colors *on*, 
> [...] until we know why users need to force-enable colors.

The reason is that adding `-fcolor-diagnostics` to the command line is not 
always feasible, e.g. most build systems would rebuild everything in that case. 
Relying on tty detection also doesn't work as many build tools buffer the 
output (and some CIs, too).

In D152285#4403318 , @MaskRay wrote:

> I don't mind how we handle `NO_COLOR=1 CLICOLOR_FORCE=1`. This seems invalid 
> input from the user and making either option win should be fine (I'd prefer 
> that `NO_COLOR` wins.)

I'd prefer NO_COLOR winning, too. I can specify that case at 
https://bixense.com/clicolors/.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152285/new/

https://reviews.llvm.org/D152285

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits