[all-commits] [llvm/llvm-project] d9b8aa: [clang-tidy] Add --use-color command line option a...

Hyd via All-commits all-commits at lists.llvm.org
Thu Jun 18 08:16:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d9b8aada8288ca4aff4a1d70bf5eb4d579c79036
      https://github.com/llvm/llvm-project/commit/d9b8aada8288ca4aff4a1d70bf5eb4d579c79036
  Author: hyd-dev <yd-huang at outlook.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/ClangTidy.cpp
    M clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
    M clang-tools-extra/clang-tidy/ClangTidyOptions.h
    M clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
    A clang-tools-extra/test/clang-tidy/infrastructure/use-color.cpp
    M clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list