Afer this commit landed we always have coloured diagnotic messages. Maybe it's a good idea to have the same default behaviour as clang-tidy has.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Would it be wise to use os.isatty(sys.stdout.fileno()) as the value if left unspecified.
As we capture stdout from clang-tidy, clang-tidy assumes we aren't connected to a terminal and thus disables colours, unless explicitly enabled.
Therefore if our python script is known to be running from a terminal and we haven't specified to use colours. We should enable --use-color.
Based off this, I think the argument should be a carbon copy of the --use-color option from clang-tidy.
Comment Actions
I think this would be a useful change. In the current state, one needs to modify the script to run this in a context where coloring is not supported.