Skip to content

Commit

Permalink
Use --use-color in run-clang-tidy.py
Browse files Browse the repository at this point in the history
Now that clang-tidy supports the --use-color command line option, it's
a better user experience to use --use-color in run-clang-tidy.py and
preserving the colored output.
  • Loading branch information
dsanders11 authored and AaronBallman committed Nov 2, 2020
1 parent ca62b86 commit a07a2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Expand Up @@ -83,7 +83,7 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
header_filter, allow_enabling_alpha_checkers,
extra_arg, extra_arg_before, quiet, config):
"""Gets a command line for clang-tidy."""
start = [clang_tidy_binary]
start = [clang_tidy_binary, '--use-color']
if allow_enabling_alpha_checkers:
start.append('-allow-enabling-analyzer-alpha-checkers')
if header_filter is not None:
Expand Down

1 comment on commit a07a2c8

@abpostelnicu
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be a good idea to leave the possibility of opting out of having coloured diagnostic messages. This tends to address the concern.

Please sign in to comment.