HomePhabricator

[clang-tidy] Add --use-color command line option and UseColor option to control…

Authored by hyd-dev on Jun 18 2020, 8:12 AM.

Description

[clang-tidy] Add --use-color command line option and UseColor option to control colors in diagnostics

This patch adds --use-color command line option and UseColor option to clang-tidy to control colors in diagnostics. With these options, users can force colorful output. This is useful when using clang-tidy with parallelization command line tools (like ninja and GNU parallel), as they often pipe clang-tidy's standard output and make the colors disappear.

Reviewed By: njames93

Differential Revision: https://reviews.llvm.org/D79477